Can't Repair Mysql Table

I have one ARCHIVE table that I simply can't repair, I already try to remove the partitioning but still get this error:

alter table promo_tool_view_44 REMOVE PARTITIONING;
ERROR 1034 (HY000): Incorrect key file for table 'promo_tool_view_44'; try to repair it

I already try to repair the table but I get this reply: repair table promo_tool_view_1;

+-----------------------------+--------+----------+-----------------------------+
| Table                       | Op     | Msg_type | Msg_text                    |
+-----------------------------+--------+----------+-----------------------------+
| vad_stats.promo_tool_view_1 | repair | error    | Partition p1 returned error |
| vad_stats.promo_tool_view_1 | repair | error    | Corrupt                     |
+-----------------------------+--------+----------+-----------------------------+

2 rows in set (0.21 sec)

How can I solve this?

Thanks,
Pedro


If you have not done it yet: Shut down your DB and back it up. Repair operations are dangerous.

Sad to say, I would strongly recommend a backup tape. Something is obviously broken in partition p1. But there are some tricks that might get your data back.

myisamchk implements lots of stuff not found in the cli. Try

myisamchk --safe-recover
myisamchk --recover

in that order and see if you have any more luck. There are plenty of flags that can help you. The full documentation can be found at

http://dev.mysql.com/doc/refman/5.5/en/myisamchk.html

The full documentation for repair in the cli can be found at http://dev.mysql.com/doc/refman/5.5/en/repair-table.html

Once you are done repairing you should track down why you got the DB corrupted in the first place. That's is not normal for MySQL databases.