0

As often happens in mysterious shutdowns during large queries, things ran afowl with InnoDB on my XAMPP MySQL installation (Windows 7 x64). I rebooted and ran Startup Repair, then loaded MySQL to truncate and restart the backup restore. Only MySQL wouldn't even start.

I eventually found that it according to the log file, "something went terribly wrong". The InnoDB tablespace was corrupted. The only way to start the server was with innodb_force_recovery = 6 in the config file, which makes tables read-only.

I have three tables: two that I would like to save and one that I was restoring. Is there a way to truncate, drop, or otherwise repair/remove the offending table, and would that solve my problem?

  • You can drop a table in recovery mode. Did you try? – akuzminsky Jun 28 '15 at 17:50
  • Only in levels 1-3, apparently. mysqld.exe will only load on level 6. – ndm13 Jun 28 '15 at 19:30
  • If that's true then it's a bug – akuzminsky Jun 28 '15 at 19:39
  • Sorry, my mistake. Apparently you can drop but not truncate, and I had only been using the latter. This makes sense because truncate uses a temp table to reconstruct the structure. I still can't drop the table, however (error 1051), but that's another problem. – ndm13 Jun 28 '15 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.