MySQL database error: Table... Is marked as crashed and shoshould be retried red

Source: Internet
Author: User

When I use a database today, the following error is returned:Table 'ios _ sample' is marked as crashed and shoshould be retried redIn desperation, stop using the database and find the cause.

It means that the data table 'ios _ samples' is marked with a problem and needs to be fixed. I remember a similar problem before, but I only need to click the repair button on phpMyAdmin to automatically fix it, but this time it was absolutely useless, so I quickly went online to find out why. Finally, the problem is solved.

The solution is as follows:

1. Find the bin/myisamchk tool in the MySQL installation directory, and enter:

$ Myisamchk-c-r ../data/tablename/posts. myi

Then the myisamchk tool will help you restore the index of the data table. You do not need to restart MySQL to solve the problem.

2. Run the repair command to connect to the database and run the following command:

Mysql> repair table 'ios _ samples ';

Problem Analysis:

1. Some netizens say that the index error caused by frequent queries and updates to the dede_archives table.

2. it is also said that the MySQL database is damaged for some reason, such: sudden Power outages on the database server and operations on the table's original files when providing services on the database table may cause damage to the MySQL database table and the data cannot be read. In short, the table is damaged due to some unpredictable problems. (This is my reason)

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.