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.

This is Drupal 6 cache table. Server version: 5.1.49-1ubuntu8.1 (Ubuntu)

According to Can't Repair Mysql Table

Shut down your DB and back it up. Repair operations are dangerous.

but according to http://www.techrepublic.com/article/checking-and-repairing-mysql-tables/5193721

The first—and most important—thing you can do before repairing a corrupted table is to back it up.

Next, shut down the MySQL server.

I've tried what techrepublic says... but I got this message from mysqlhotcopy:

DBD::mysql::db do failed: Table './dbname/cache' is marked as crashed and last (automatic?) repair failed at /usr/bin/mysqlhotcopy line 460.

and I got this message from mysqldump:

mysqldump: Couldn't execute 'show create table `cache`': Table './dbname/cache' is marked as crashed and last (automatic?) repair failed (144)
share|improve this question
    
If it's just a cache table, just drop it and re-create the table. It'll get automatically re-populated as the site is used. –  EEAA May 3 '11 at 14:51
add comment

1 Answer

up vote 0 down vote accepted

If you stop the MySQL server then you should be able to take a backup of the database files from /var/lib/mysql/databasename which you could restore if there is a problem with the repair and you cannot take a proper backup via mysqldump

share|improve this answer
add comment

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.