3

I am getting the error:

Table 'feed_data' is marked as crashed and should be repaired

So I run REPAIR TABLE feed_data (repeatedly) and get the following result:

+----------------+--------+----------+---------------------------------------------------------------+
| Table          | Op     | Msg_type | Msg_text                                                      |
+----------------+--------+----------+---------------------------------------------------------------+
| mydb.feed_data | repair | Error    | Table 'feed_data' is marked as crashed and should be repaired | 
| mydb.feed_data | repair | status   | Table is already up to date                                   | 
+----------------+--------+----------+---------------------------------------------------------------+
2 rows in set (0.06 sec)

The table still shows as crashed. Why won't the table repair when I run the repair table command? What else can I do to repair the crashed table?

2 Answers 2

2

Shutdown the DB and use myisamchk.

1
  • I once had to export that data, the rebuild the table and reimport the data because myisamchk didn't work.
    – lilott8
    Commented Mar 4, 2011 at 18:02
1

You may also want to have mysql perform automatic repairs each time you restart mysql

Just add this to the [mysqld] section of /etc/my.cnf

myisam-recover=<\option[,option]*>

Here is a more detailed explanation of the options as explained in the book

enter image description here

MySQL 5.0 Certification Study Guide Chapter 30 Section 30.5 Pages 444,445

Here are the options for myisam-recover

  • DEFAULT for the default checking

  • BACKUP tells the server to make a backup of any table that it must change

  • FORCE causes table recovery to be performed even if it would cause the loss of more than one row of data

  • QUICK performs quick recovery: Tables that have no holes resulting from deletes or updates are skipped

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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