MySQL: marked as crashed and should be repaired

I was receiving the following error message in a MySQL database.

SQL Error: Table ‘./dbname/tablename’ is marked as crashed and should be repaired

So first I tried:

REPAIR TABLE `tablename`;

However the table was still showing as crashed.
Next I tried:

mysqlcheck -r -u username -p databasename

Which took some time as the database is very big but did not fix the problem table.

The next option was to use myisamchk repair functions while mysql is shutdown/stopped from shell with :

myisamchk -r -u root -p databasename


but I did not have time or space to take the database offline to do this and the data in the table in question was not valuable enough to take the other tables offline for.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>