Page 1 of 1

MySQL: 'table' is marked as crashed

Posted: Fri Feb 17, 2012 10:43 pm
by ^rooker
[PROBlEM]
Out of nothing, my mysql backup would refuse to dump a database to a file, complaining that:
'table' is marked as crashed and should be repaired when using LOCK TABLES
omph. :(

[SOLUTION]
I've been running Drupal, so I took the site accessing that database offline for maintenance (Cheap "lock tables")

Then I went into mysql's data folder that keeps the data of the affected database 'ouch' and used 'myisamchk -r' to repair the 'table_that_crashed':

Code: Select all

cd /var/lib/mysql/ouch
myisamchk -r table_that_crashed