MySQL is not starting and giving innodb corrupt errors. How can I fix this? Print

  • 0

If MySQL is not starting and giving innodb corrupt errors in /var/lib/mysql/$HOSTNAME.err you can do the following to attempt to get MySQL to start:

* check the MySQL error log:

tail -n30 /var/lib/mysql/$HOSTNAME.err

* Edit /etc/my.cnf and add the line:

innodb_force_recovery = 4

* Restart MySQL:

service mysql restart

* Edit /etc/my.cnf and remove the line:

innodb_force_recovery = 4

* Restart MySQL:

service mysql restart


Was this answer helpful?

« Back