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:
- Making a complete snapshot of your droplet
- Starting MySQL in recovery mode, making MySQL dumps of all the databases,
- Checking the dump files (make sure all info and data is there)
- Deleting the corrupted databases, then try remaking them using the dumps
- 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,
DigitalOcean Platform Support Lead