Recently my SQL server has crashed and was unable to start, I have tried to fix the issue but could not, by seeing the log file I could only understand that there is a problem with the innodb database and the only way to work around with the issue is to recover innodb. But I cannot loose the database since it was very critical for my project.
So after little R&D I was able to start the server using the innodb recovery mode, here is how to do it
Open the mysql config file i.e. my.ini and add the following line under the [mysqld] line
innodb_force_recovery = 4
this will start the mysql server in innodb recovery mode and gives you the chance to repair the database.
For your information the mysql logfile
131121 1:18:48 InnoDB: Page checksum 4132264320, prior-to-4.0.14-form checksum 47764882
InnoDB: stored checksum 4132264320, prior-to-4.0.14-form stored checksum 1792345140
InnoDB: Page lsn 0 58314446, low 4 bytes of lsn at page end 58279508
InnoDB: Page number (if stored to page already) 590,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an update undo log page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 590.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
131121 1:18:48 InnoDB: Assertion failure in thread 2996 in file buf0buf.c line 3602
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
So after little R&D I was able to start the server using the innodb recovery mode, here is how to do it
Open the mysql config file i.e. my.ini and add the following line under the [mysqld] line
innodb_force_recovery = 4
this will start the mysql server in innodb recovery mode and gives you the chance to repair the database.
For your information the mysql logfile
131121 1:18:48 InnoDB: Page checksum 4132264320, prior-to-4.0.14-form checksum 47764882
InnoDB: stored checksum 4132264320, prior-to-4.0.14-form stored checksum 1792345140
InnoDB: Page lsn 0 58314446, low 4 bytes of lsn at page end 58279508
InnoDB: Page number (if stored to page already) 590,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an update undo log page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 590.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
131121 1:18:48 InnoDB: Assertion failure in thread 2996 in file buf0buf.c line 3602
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.