MySql Innodb corruption recovery
Posted on 2006-05-05
I have a MySql database, just containing Innodb tables, that seems to have corrupted itself.
It replicates to another server and it has corrupted that one too!
The symprom is that I can restart the server but as soon as I try to connect to it, it crashes.
The log file talks about a possible index page corruption to a specific table and that fits in terms of the table being accessed when the problem occurred.
Following the Innodb recovery guidelines in the MySql manual, I have set the innodb_force_recovery option to 6 which lets me restart the database and dump the tables.
Anything less than 6 and it will not stay up.
My questions are:
How do I know the extent of the innodb corruption?
Is the only safe option to recreate the innodb files from scratch (I assume via a re-install) or is there a smarter way to do this
Can I trust the table dumps or should I go back to the most recent backup (also a table dump) and accept the data loss
If it is an index page corruption, can I rebuild the primary index of the affected table and then restart the DB without the innodb_force_recovery option