Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
myisam table storage? –  rkthkr May 3 '10 at 6:53

2 Answers 2

up vote 5 down vote accepted

To check the tables:

CHECK TABLE mytable1

To repair the table:

REPAIR TABLE mytable1
share|improve this answer

Do this.

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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