mysql is marked as crashed and should be repaired
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql is marked as crashed and should be repaired相关的知识,希望对你有一定的参考价值。
-备份数据库时报错
[ERROR] /usr/sbin/mysqld: Table ‘./daifans/wp_options‘ is marked as crashed and should be repaired
- 在网上查了文档,说是表损坏,所以 WordPress 的文章都显示不出来,需要修复,修复前需要备份
我备份时也出错了,说是损坏的那个表备份不了的意思,我就用排除废表备份其他的
# mysqldump -uroot -p dbname --ignore-table=dbname.tablename --ignore-table=dbname.tablename2 --ignore-table=dbname.tablename3 > dump.sql
然后添加 –auto-repair 参数自动修复
# mysqlcheck -u root -p daifans --auto-repair
Enter password: daifans.wp_commentmeta error : Table upgrade required. Please do "REPAIR TABLE `wp_commentmeta`" or dump/reload to fix it! daifans.wp_comments error : Table upgrade required. Please do "REPAIR TABLE `wp_comments`" or dump/reload to fix it! daifans.wp_links error : Table upgrade required. Please do "REPAIR TABLE `wp_links`" or dump/reload to fix it! daifans.wp_options error : Table upgrade required. Please do "REPAIR TABLE `wp_options`" or dump/reload to fix it! daifans.wp_postmeta error : Table upgrade required. Please do "REPAIR TABLE `wp_postmeta`" or dump/reload to fix it! daifans.wp_posts error : Table upgrade required. Please do "REPAIR TABLE `wp_posts`" or dump/reload to fix it! daifans.wp_term_relationships OK daifans.wp_term_taxonomy error : Table upgrade required. Please do "REPAIR TABLE `wp_term_taxonomy`" or dump/reload to fix it! daifans.wp_terms error : Table upgrade required. Please do "REPAIR TABLE `wp_terms`" or dump/reload to fix it! daifans.wp_usermeta error : Table upgrade required. Please do "REPAIR TABLE `wp_usermeta`" or dump/reload to fix it! daifans.wp_users error : Table upgrade required. Please do "REPAIR TABLE `wp_users`" or dump/reload to fix it! Repairing tables daifans.wp_commentmeta OK daifans.wp_comments OK daifans.wp_links OK daifans.wp_options OK daifans.wp_postmeta OK daifans.wp_posts OK daifans.wp_term_taxonomy OK daifans.wp_terms OK daifans.wp_usermeta OK daifans.wp_users OK
-修复完之后就可以备份了
以上是关于mysql is marked as crashed and should be repaired的主要内容,如果未能解决你的问题,请参考以下文章
mysql is marked as crashed and should be repaired
mysql 错误:Table is marked as crashed and should be repaired 解决办法
mysql 错误:Table is marked as crashed and should be repaired 解决办法
Table '.mysqlproc' is marked as crashed and should be repaired 报错
Table '' is marked as crashed and should be repaired 解决方法
mysql报错:Table 'ta_history' is marked as crashed and should be repa