subject: Fixing Innodb Table Corruption Post [print this page] InnoDB tables, like any other database components can be corrupted due to a logical crash. Few most common logical crashes that occur most often are MySQLD (MySQL Server) improper shutdown, virus infection, application bugs, third-party software installation, and virus infection. In most of these cases, the database administrator encounters an error message that makes the records saved in these tables inaccessible. For repairing the corrupted InnoDB tables, the database user can execute "innodb_force_recovery = 4" command. In most situations, this repair command works and the table comes in reusable state. However, if the table is severely damaged, then this utility fails to repair the table. For such cases, the database users needs to repair the table by using an efficient third-party MySQL Database Repair application.
To explain the above InnoDB table corruption in detail, consider the below error message:
"081107 18:28:20 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 22 3993024000
InnoDB: Doing recovery: scanned up to log sequence number 22 3998266880..."
This error message pops up at the time of InnoDB database table. After this error message appears, the data saved in the database table becomes inaccessible. In addition, the error message repeatedly occurs each time you try to open the database records.
Resolution
To fix the above error message and to repair the InnoDB database table, consider taking below actions:
An easy way to repair a corrupted table is by using an inbuilt repair utility command 'innodb_force_recovery=4'.
However, if the command fails to master the above error message and corruption persists, then you will need to delete the corrupted table and restore the table from an updated backup.
However, if in case of backup unavailability or insufficiency, you are not left with any option, but to choose a commercial mysql database repair utility to repair your database table. A MySQL Repair tool embeds powerful algorithms to repair the corrupt InnoDB table.
Database Recovery For MySQL repairs and restores corrupt MySQL tables created in MyISAM and InnoDB engines. This mysql repair application is totally non-destructive and user-friendly. Supported by MySQL 5.x and 4.x, the tool is compatible with Windows 7, Vista, 2003, XP, and 2000.