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.

I have a MySQL 5.1.63 server and two uncorrectable MyISAM table. I tried the following ways to repair it:

  • mysqlcheck -r db.tbl1
  • myisamchk -re /var/lib/mysql/db/tbl1
  • myisamchk -oe /var/lib/mysql/db/tbl1

The mysqlcheck and ALTER TABLE show me the following error:

Error    : Incorrect key file for table 'tbl1'; try to repair it
error    : Corrupt

The myisamchk (both version) says:

- recovering (with sort) MyISAM-table 'tbl1'
Data records: 232311
- Fixing index 1
- Fixing index 2
- Fixing index 3

So it seems fixed the table, but in the real it is not being fixed.

This table is relative new (2008) and not a migrated table (so it is not migrated from older MySQL versions, like 4.x).

Can anyone give me any idea how can I really fix this table? It causes problems in mysqldump too.

share|improve this question
Restore from your one of your backups? –  Zoredache Oct 5 '12 at 22:12
There is no backup. This problem is happened before I started working at the company but nobody cared about it. However now I need to make a full mysqldump from this db, but it crashes because of these tables. –  Gabor Garami Oct 5 '12 at 22:22
If they are badly broken, and you can't get any data out of them, can you just delete them? Can the data that should be in them be re-created from other sources? Are you able to run a SQL query against the tables to retrieve any data at all? Stop the database server, and move the data files out of the main directory. –  Zoredache Oct 5 '12 at 22:39
Yes i can delete the tables but i wouldn't like to do it until I am not sure it is unrecoverable. I dunno the data is re-creatable or not because I just administrate this database and I don't know anyithing the frontend application: that is out of my scope. –  Gabor Garami Oct 6 '12 at 23:37
I cannot run queries against the table because I get same error as mysqlcheck: table is corrupt. I moved table files to another database to make mysqldump working again, so currently the production database is not intended in this error, but I think moving out from datadir is prevents me to work with tables from mysql if it is needed. –  Gabor Garami Oct 6 '12 at 23:50
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.