Easy to understand the corrupted MyISAM table _ MySQL in MySQL

Source: Internet
Author: User
It is easy to understand that MySQL contains corrupted MyISAM tables, even if the MyISAM table is very reliable (all changes made to the SQL statement table are written before the statement returns), if any of the following events occur, you can still obtain the damaged table:

? The MySQLd process is killed during write.

? An unexpected computer shutdown occurs (for example, the computer is shut down ).

? Hardware faults.

? You can also use external programs (such as myisamchk) on the tables being modified by the server ).

? Software defects of MySQL or MyISAM code.

Typical symptoms of a damaged table are as follows:

? When selecting data from a table, you get the following error:

? Incorrect key file for table: '...'. Try to repair it

? The query cannot find rows in the table or return incomplete data.

You can use the check table statement to CHECK the health of the MyISAM TABLE and use the repair table to REPAIR a damaged MyISAM TABLE. When mysqld is not running, you can also run the myisamchk command to check or repair a table.

If your table becomes corrupted frequently, you should try to determine why. The most important thing to understand is whether the table becomes corrupted because of a server crash. You can find the latest restarted mysqld message in the error log to verify this message early. If such a message exists, it is very likely that the table is damaged because the server is dead. Otherwise, the damage may occur during normal operations. This is a defect. You should try to create a repeatable test case that shows the problem.

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.