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?

link|improve this question

myisam table storage? – rkthkr May 3 '10 at 6:53
feedback

2 Answers

up vote 4 down vote accepted

To check the tables:

CHECK TABLE mytable1

To repair the table:

REPAIR TABLE mytable1
link|improve this answer
feedback

Do this.

cd /var/lib/mysql/dbname myisamchk --silent --force *.MYI

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.