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)