Mysql Data Table repair command

Source: Internet
Author: User

One day, a data table in a database is being deleted, and a sudden power failure occurs. After the server restarts, it continues to run the DELETE command. The following error occurs:

Mysql> Delete from Table1 where ymd <= 20091031;
Error 126 (hy000): Incorrect key file for table './db1/table1.myi'; try to repair it

 

# Myisamchk-r/var/lib/MySQL/db1/table1.myi
Report that the repair is successful, but an error occurs after executing the DELETE command;

 

Mysql> repair table Table1;
The fix is successful. Run the DELETE command OK;

It is strange that we have not had time to study why, so we should record it first.

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.