Innodb force recovery help

I think that my mySQL database is corrupt, and after consultation with Digital Ocean the help guy has advised me to run an innodb_force_recovery. They have sent me over a link to a document that explains the process, however I am at a loss as to how to run the command via the Digital Ocean console. Do I need to be in a specific folder 1st, run another command before hand, etc?

Any help will be appreciated.

(please note that I did not set up this droplet, i’ve inherited it when the previous person left. I only have the root user password, and the database password in the wordrpress php file)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

“Checking the dump files” - sounds just amazing! no any specific details - just be tricky ) is there any way to get normal response?

Fixing InnoDB tablespace corruption, or otherr such sever InnoDB issues are quite tricky. You can mess up a lot doing this if you don’t know what you’re doing. Because of how complicated the process can be, it requires a lot of MySQL knowledge.

If you are going to attempt it, I would suggest doing the following before hand:

  1. Making a complete snapshot of your droplet
  2. Starting MySQL in recovery mode, making MySQL dumps of all the databases,
  3. Checking the dump files (make sure all info and data is there)
  4. Deleting the corrupted databases, then try remaking them using the dumps
  5. Restarting MySQL

If that does not work, then you would want to try doing a Force Recovery via InnoDB. To do this, place the following line in the /etc/my.cnf file:


After that, restart your MySQL service and let InnoDB try to recover itself. If it fails, change the value from the above code snippet to 3, then try restarting MySQL once more. If that fails, try changing it to 4 then trying once more. If that still fails, you will want to reach out to a MySQL expert, as anything beyond level 4 can do pretty severe damage to your data and droplet.

An alternative that may be easier for you is to use a third party repair tool. I cannot personally vouch for them, but a highly recommend on is Stellar Phoenix.

Please keep in mind everything above is very tricky to do. As such, make sure you have a snapshot made. Worse case scenario, you can revert and try to start from the beginning.

Hope it helps, Jason C. DigitalOcean Platform Support Lead