table doesn't exist after changing data location
Posted by: Chris Cheshire
Date: July 27, 2012 08:53AM

Edit: Solved. It turns out I needed to copy the original ibdata1 file.


MySQL 5.5.25
Windows 7 x64
InnoDB storage, file per table.

I tried moving my data directory to a new SSD and now I am getting "Table doesn't exist" errors.

I stopped mysql, changed the datadir parameter, copied all the old data files to the new location except for the pid & err files and ibdata1, ib_logfile0 and ib_logfile1. I then restarted mysql and those files were recreated in the new location.

Now when I try to query a table I a table not found error, and the following in the logs :
Quote

[ERROR] Cannot find or open table dbname/tablename from
the internal data dictionary of InnoDB though the .frm file for the
table exists. Maybe you have deleted and recreated InnoDB data
files but have forgotten to delete the corresponding .frm files
of InnoDB tables, or you have moved .frm files to another database?
or, the table contains indexes that this version of the engine
doesn't support.
See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
how you can resolve the problem.

What else do I need to do?

Chris



Edited 1 time(s). Last edit at 07/27/2012 09:12AM by Chris Cheshire.

Options: ReplyQuote


Subject
Written By
Posted
table doesn't exist after changing data location
July 27, 2012 08:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.