After a disk full issue one of the MySQL DBs on the server is coming up with the following error when I try to back it up:
[root@mybox ~]# mysqldump -p --result-file=/tmp/dbbackup.sql --database myDBname
Enter password:
mysqldump: Got error: 145: Table './myDBname/myTable1' is marked as crashed and should be repaired when using LOCK TABLES
A bit of investigation shows two tables have this issue.
What needs to be done to fix up the damaged tables?
To check the tables:
To repair the table:
Here is specifically what always fixes the table for me:
Source: http://realtechtalk.com/MySQL_table_is_marked_as_crashed_solultion-1924-articles
Do this.
cd /var/lib/mysql/dbname myisamchk --silent --force *.MYI