Table is marked as crashed and should be repaired How to fix the error? As an excellent open source database version, Mysql database supports large data storage. However, if there are too many operations and frequent operations on the table, there may be problems with the database table that need to be optimized and repaired. This experience will briefly demonstrate the repair method
Repair the database
1. Refer to the command format
REPAIR TABLE `table_name` to repair the table. The specific operation is as follows
2. Optimize the database mysql table information
Refer to the following picture sample format OPTIMIZE TABLE `table_name` Optimization table
3. The above commands are simple There are commands to repair database tables, but what if you need to repair tables in batches? You can refer to the following graphical management tools to operate
Graphical interface database tool repair
1. After connecting to the database through a graphical database management tool such as navicat for rmysql or phpmyadmin. Select the table that needs to be repaired. Or select all, select optimize table
#2. As shown below, you will be reminded of the current database table situation. Which tables have been optimized successfully
##3. Similarly, for frequently operated tables, database table inspection and repair operations can also be performed. The method is the same
4. Status reminder after repair, Table is marked as crashed and should be repaired. Just ask you to repair this table
##Notes
It is very convenient to connect mysql optimization, check and repair tables through graphical management tools. But be sure to be careful not to select Delete
The above is the detailed content of How to optimize and repair database tables in Mysql. For more information, please follow other related articles on the PHP Chinese website!