How To Repair Corrupted MySQL Tables Using myisamchk

  • May 30, 2015
  • 0 Comments

When you are doing some mysqlcheck autorepair option, sometimes you would see a crash table like this:

=======================

warungko_iklobcom.wp_commentmeta

Error    : Table './warungko_iklobcom/wp_commentmeta' is marked as crashed and last (automatic?) repair failed

Error    : Table 'wp_commentmeta' is marked as crashed and last (automatic?) repair failed

error    : Corrupt

warungko_iklobcom.wp_commentmeta

error    : Can't create new tempfile: './warungko_iklobcom/wp_commentmeta.TMD'

status   : Operation failed

=======================

To fix this issue, simply go to the folder that contains this table (for example: /var/lib/mysql/warungko_iklobcom ) and then type: 

myisamchk -r -f wp_commentmeta.MYI

It will produce output like:

- recovering (with sort) MyISAM-table 'wp_commentmeta.MYI'

Data records: 6

- Fixing index 1

- Fixing index 2

- Fixing index 3


How helpful was this article to you?

Posting has been disabled.