How to repair tables after a MySQL crash
Sometimes MySQL crashes. The most usual case is a hard disk getting full.
When that happens, you will have database tables marked as crashed and Asternic won’t work correctly (or it will not update data), even after you make room on your hard disk again.
To find out if some your tables are marked as crashed you can run these commands:
mysql -u root -p qstats -e "select * from queue_stats limit 10"
mysql -u root -p qstats -e "select * from queue_stats_mv limit 10"
mysql -u root -p qstats -e "select * from recordings limit 10"
If any of those returns an error saying that the table is marked as “crashed”, then you must repair them with the following commands:
mysql -u root -p qstats -e "repair table queue_stats"
mysql -u root -p qstats -e "repair table queue_stats_mv"
mysql -u root -p qstats -e "repair table recordings"
Please note that both the recordings
and the queue_stats_mv
tables are part of CCStats PRO only. No such table exists on the Lite version.
After repairing the tables, start the log parser service:
service asterniclog start