Difference between revisions of "How to recover corrupted MySQL data"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with 'Sometimes MySQL data gets corrupted. It often happens when HDD space runs out. After that when MySQL process is started, it keeps crashing. Example how it looks in the /var/lo…')
 
Line 8: Line 8:


[[File:mysql_crashing_log.png|300px]]
[[File:mysql_crashing_log.png|300px]]
Solution to this is into file /etc/my.cnf enter such line:
innodb_force_recovery = 4
and restart MySQL process:
/etc/init.d/mysql restart
After that log should show that recovery mode is turned on:
[[File:mysql_recovery_on_log.png|300px]]

Revision as of 18:36, 13 May 2011

Sometimes MySQL data gets corrupted.

It often happens when HDD space runs out.

After that when MySQL process is started, it keeps crashing.

Example how it looks in the /var/log/mysql.log:

Mysql crashing log.png


Solution to this is into file /etc/my.cnf enter such line:

innodb_force_recovery = 4 

and restart MySQL process:

/etc/init.d/mysql restart

After that log should show that recovery mode is turned on:

Mysql recovery on log.png