Repairing a MySQL database
2010-04-21It sometimes happens that if your database server crashes, you may find that:
In order to fix these issues, you should:
- QM is not working because it cannot access the database
- Qloaderd is not working because it cannot write to the queue_log table
- You get weird errors when updating from an older version of QM
In order to fix these issues, you should:
- stop MySQL - THIS IS EXTREMELY IMPORTANT
/etc/init.d/mysqld stop
- check tables using myisamchk (use the same case as written here):
myisamchk -c /var/lib/mysql/queuemetrics/*.MYI
- if any error is shown, repair tables:
myisamchk -r /var/lib/mysql/queuemetrics/*.MYI
- after that, restart Mysql:
/etc/init.d/mysqld start