MySQL – Unable to Load Dump File

corruptioninnodbMySQLmysqldump

I recently had to deal with migrating some servers over (rather was forced to by the hosting company) and we took too long to migrate our data so they did it for us. Unfortunately they just copied /var/lib/mysql for the database. Which created all sorts of errors when trying to get the data working again. So I ran mysql in innodb_force_recovery = 1 mode and was able to take dumps of all but 1 of my databases.

Then I completely uninstalled mysql and reinstalled and tried to import the dump files into the newly created databases.

Then I got this error:

ERROR 1030 (HY000) at line 810: Got error -1 from storage engine

So line 810 is the first data insert. It seems there is not problem creating tables, but anytime I try to insert I get that error. I can't seem to find any documentation on what that error means.

How do I go about resolving this error?

Note: After a bit more digging, it seems to be an error that only occurs with innodb tables. In fact I tried converting a myisam table to innodb and got the same exact error.

Best Answer

Solved:

ERROR 1030 (HY000) at line 810: Got error -1 from storage engine

The above error means you have innodb_force_recovery set in your my.cnf I'm not sure why I couldn't find this easily in mysql documentation, but it's simple enough.