MySQL: 'table' is marked as crashed

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

MySQL: 'table' is marked as crashed

Post 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
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply