在给mysql数据库备份时,报错: mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as c rashed and should be repaired when using LOCK TABLES
在给mysql数据库备份时,报错:
mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as c
rashed and should be repaired when using LOCK TABLES
如上错误的解决方法如下:
1、进入数据库对该表进行检测:
mysql> check tables pre_forum_thread;
+------------------------------+-------+----------+-----------------------------
--------------------------+
| Table | Op | Msg_type | Msg_text
|
+------------------------------+-------+----------+-----------------------------
--------------------------+
| shengdaxcom.pre_forum_thread | check | warning | Table is marked as crashed
|
| shengdaxcom.pre_forum_thread | check | warning | 1 client is using or hasn't
closed the table properly |
| shengdaxcom.pre_forum_thread | check | error | Size of indexfile is: 845824
Should be: 846848 |
| shengdaxcom.pre_forum_thread | check | error | Corrupt
|
+------------------------------+-------+----------+-----------------------------
--------------------------+
4 rows in set (0.06 sec)
2、使用repair解决方法:
mysql> repair tables pre_forum_thread;
+------------------------------+--------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+------------------------------+--------+----------+----------+
| shengdaxcom.pre_forum_thread | repair | status | OK |
+------------------------------+--------+----------+----------+
1 row in set (0.31 sec)
再次进行dump备份就可以了。
其他参考:
只要在mysqldump的时候加上--lock-tables=false就可以解决问题。
mysqldump -u root -pMyPassword DbName --lock-tables=false > data.sql
- 导出Mysql数据库出错:Got error: 145: Table 'wp_options' is marked as crashed and should be repaired when using LOCK TABLES的解决方法
- 备份mysql数据库提示marked as crashed and should be repaired when doing LOCK TABLES
- is marked as crashed and should be repaired when using LOCK TABLES
- 备份mysql数据库提示marked as crashed and should be repaired when doing LOCK TABLES
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: Got error: 1449: The user specified as a definer ('fk_system'@'localhost') does not exist when using LOCK TABLES
- 解决MYSQL数据库 Table ‘xxx’ is marked as crashed and should be repaired 145错误
- mysql错误:ERROR 145 (HY000): Table './zentao/zt_action' is marked as crashed and should be repaired
- 解决MYSQL数据库 Table ‘xxx’ is marked as crashed and should be repaired 145错误
- 关于MYSQL:Got error 134 from storage engine/is marked as crashed and should be repaired
- Mysql错误:Table 'xxx'is marked as crashed and should be repaired 错误编号:145
- mysql:ERROR 1194 (HY000): Table 'user' is marked as crashed and should be repaired
- ERROR 145 (HY000) at line 34: Table is marked as crashed and should be repaired
- Table 'user' is marked as crashed and should be repaired
- mysql数据库出现“is marked as crashed and should be repaired“的悲惨经历
- Table './mysql/proc' is marked as crashed and should be repaired 解决方法
- Table '.\mysql\proc' is marked as crashed and should be repaired 报错
- MySQL数据库出错:Table ... is marked as crashed and should be repaired
- Table '.\mysql\proc' is marked as crashed and should be repaired 报错
- MySQL error: 145 (Table 'xxx' is marked as crashed and should be repaired
- 解决数据库 Table 'content_tags' is marked as crashed and should be repaired 表损坏问题