MySQL: table is marked as crashed

MySQL

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?

Best Answer

To check the tables:

CHECK TABLE mytable1

To repair the table:

REPAIR TABLE mytable1