【mysql】 is marked as crashed and should be repaired
短信预约 -IT技能 免费直播动态提醒
-备份数据库时报错
[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
-修复完之后就可以备份了
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341