Table 'xxx' is marked as crashed and should be repairedSolutions

Find the wrong table name.MYI path under the database name under var in the mysql installation directory, view and copy the path with pwd.

Enter under bin under mysq and enter

myisamchk -c -r /www/mysql/var/数据库名/出错表名.MYI
然后重启mysql
service mysqld restart

  ------------- Today there is a problem again, update the repair plan ----------------

//查看各个表的状态
mysqlcheck -u root -p 数据库名
Enter password:

//备份数据库,可略过,以防万一备份一下
mysqldump -u root -p 数据库名> 数据库名.sql
Enter password:

//修复受损表
mysqlcheck -u root -p 数据库名 --auto-repair
Enter password:

The first method deals with a single table, the following methods can be repaired as a whole.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325940239&siteId=291194637