MySQL 5.6 MyISAM engine table damaged

Source: Internet
Author: User

    1. Alarm Log found Error

2016-12-05 13:01:23 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:23 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:25 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:26 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:28 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:29 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired

2016-12-05 13:01:31 27830 [ERROR]/usr/sbin/mysqld:table './user/t_customer ' is marked as crashed and should be repaired


2. Check the table


([email protected]) [user]> Check table T_customer;

+---------------------------------+-------+----------+--------------------------------------------------------- -+

| Table | Op | Msg_type | Msg_text |

+---------------------------------+-------+----------+--------------------------------------------------------- -+

| User.t_customer | Check | Warning | Table is marked as crashed |

| User.t_customer | Check | Warning | 2 clients is using or haven ' t closed the table properly |

| User.t_customer | Check | Error | Checksum for Key:2 doesn ' t match Checksum for Records |

| User.t_customer | Check | Error | corrupt |

+---------------------------------+-------+----------+--------------------------------------------------------- -+

4 rows in Set (0.10 sec)


3. Repair Table

([email protected]) [user]> Repair table T_customer;

+---------------------------------+--------+----------+----------+

| Table | Op | Msg_type | Msg_text |

+---------------------------------+--------+----------+----------+

| User.t_customer | Repair | Status | OK |

+---------------------------------+--------+----------+----------+

1 row in Set (0.27 sec)


4. Check the table again

([email protected]) [user]> Check table T_customer;

+---------------------------------+-------+----------+----------+

| Table | Op | Msg_type | Msg_text |

+---------------------------------+-------+----------+----------+

| User.t_customer | Check | Status | OK |

+---------------------------------+-------+----------+----------+

1 row in Set (0.00 sec)


([email protected]) [user]>


Suggestions:

1) MySQL 5.6 version does not recommend using the MyISAM engine, the InnoDB engine can completely replace the MyISAM engine, and the InnoDB engine is also the 5.6 version of the default engine.

2) The abnormal start and stop of the database, and the server abnormally shut down and so on, can cause the damage of the table easily.

This article is from the "dba003" blog, make sure to keep this source http://dba003.blog.51cto.com/12318731/1879840

MySQL 5.6 MyISAM engine table damaged

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.