MySQL appears "Incorrect key file for table" processing

Source: Internet
Author: User
Tags table name

Recent server problems have caused the company's website data to be lost a lot. The wisdom of the soft also lost a lot. I've been working on this for the last few days. Repair data.

It's time to restore a customer's data today. Found a consistent problem. Multiple tables have been corrupted. Because they are all copied directly into the table. And then there's this problem, as shown in the diagram:

Dedecms Error warnin!
Error infos:incorrect key file for table ' it_member_snsmsg '; Try to repair it


Picture 1

This is to say that the watch has broken down.

Repair method as above:

Here is how to do it:

Enter directly in the Dede background SQL operation

Copy Code code as follows:


Repair Table TableName;


REPAIR TABLE tablename use_frm

Change the tablename to the table name! But fixing the data will throw it away. You can only import data into the.

If we operate on the server we can use Navicat Lite for MySQL software or batch processing

Copy Code code as follows:


cmd/k myisamchk--recover dede_archives

The Linux server has a MySQL error resolution:

Mysql> SELECT * from Filter limit 4;
ERROR 1034 (HY000): Incorrect key file for table ' Filter '; try to repair it

Repair table is not available after repair:
mysql> repair table Filter;
+ ————— +--–+ ———-+ ——————————————————— +
| table         | op     | Msg_type | msg_text                                                  |
+ ————— +--–+ ———-+ ——————————————————— +
| pfsmtp. Filter | Repair | error    | Incorrect key file for table ' Filter '; Try to repair it |
| pfsmtp. Filter | Repair | error    | corrupt                                                 &nBSP; |

Exit MySQL and perform the following repair actions:
Myisamchk-of/mail/var/mysql/smtp/filter.myi
Myisamchk-r/mail/var/mysql/smtp/filter.myi
Myisamchk safe-recover/mail/var/mysql/smtp/filter.myi

Restart MySQL and restore the normal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.