解决 MySQL 的 Table is marked as crashed and should be repaired 问题
来源:互联网 发布:新加坡网购软件 编辑:程序博客网 时间:2024/06/04 19:34
转自:http://www.vpsee.com/2013/08/how-to-fix-mysql-table-is-marked-as-crashed-and-should-be-repaird/
昨天一位 VPS 客户说他的 WordPress 博客没了,网站可以打开,但是文章都没了,怀疑被黑。我们登陆客户 VPS 后没发现被黑迹象,然后进入 MySQL 数据库发现 Table ‘./wordpress/wp_posts’ is marked as crashed and should be repaired 错误,因为 wp_posts 表被损坏了,所以 WordPress 的文章都显示不出来:
# mysql -u root -pEnter password:mysql> use wordpress;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> select * from wp_posts;ERROR 145 (HY000): Table './wordpress/wp_posts' is marked as crashed and should be repairedmysql> Bye
修复 MySQL 数据库数据表问题可以由 mysqlcheck 来解决,先用 mysqlcheck 查看一下:
# mysqlcheck -u root -p wordpressEnter password:
然后添加 –auto-repair 参数自动修复,最好修复前备份一下数据库:
# mysqldump -u root -p wordpress > wordpress.sqlEnter password:# mysqlcheck -u root -p wordpress --auto-repairEnter password:wordpress.wp_commentmetaerror : Table upgrade required. Please do "REPAIR TABLE `wp_commentmeta`" or dump/reload to fix it!wordpress.wp_commentserror : Table upgrade required. Please do "REPAIR TABLE `wp_comments`" or dump/reload to fix it!wordpress.wp_linkserror : Table upgrade required. Please do "REPAIR TABLE `wp_links`" or dump/reload to fix it!wordpress.wp_optionserror : Table upgrade required. Please do "REPAIR TABLE `wp_options`" or dump/reload to fix it!wordpress.wp_postmetaerror : Table upgrade required. Please do "REPAIR TABLE `wp_postmeta`" or dump/reload to fix it!wordpress.wp_postserror : Table upgrade required. Please do "REPAIR TABLE `wp_posts`" or dump/reload to fix it!wordpress.wp_term_relationships OKwordpress.wp_term_taxonomyerror : Table upgrade required. Please do "REPAIR TABLE `wp_term_taxonomy`" or dump/reload to fix it!wordpress.wp_termserror : Table upgrade required. Please do "REPAIR TABLE `wp_terms`" or dump/reload to fix it!wordpress.wp_usermetaerror : Table upgrade required. Please do "REPAIR TABLE `wp_usermeta`" or dump/reload to fix it!wordpress.wp_userserror : Table upgrade required. Please do "REPAIR TABLE `wp_users`" or dump/reload to fix it!Repairing tableswordpress.wp_commentmeta OKwordpress.wp_comments OKwordpress.wp_links OKwordpress.wp_options OKwordpress.wp_postmeta OKwordpress.wp_posts OKwordpress.wp_term_taxonomy OKwordpress.wp_terms OKwordpress.wp_usermeta OKwordpress.wp_users OK
0 0
- 解决 MySQL 的 Table is marked as crashed and should be repaired 问题
- Table 'this_' is marked as crashed and should be repaired (MYSQL数据错误解决)
- 解决MYSQL数据库 Table ‘xxx’ is marked as crashed and should be repaired 145错误
- 解决MYSQL数据库 Table ‘xxx’ is marked as crashed and should be repaired 145错误
- 解决数据库 Table 'content_tags' is marked as crashed and should be repaired 表损坏问题
- Mysql 出现 Table ‘xxx’ is marked as crashed and should be repaired 问题
- Mac的mysql出现Table 'AAA' is marked as crashed and should be repaired
- 解决MySQL"is marked as crashed and should be repaired"问题
- Table 'table_name' is marked as crashed and should be repaired
- Table 'xxxxxxx' is marked as crashed and should be repaired
- Table ‘xxx’ is marked as crashed and should be repaired ...
- linux Table is marked as crashed and should be repaired
- Table '.\tablename' is marked as crashed and should be repaired
- Table 'user_xxxxx' is marked as crashed and should be repaired
- Table is marked as crashed and should be repaired
- 解决“is marked as crashed and should be repaired”
- mysql错误:is marked as crashed and should be repaired
- mysql错误is marked as crashed and should be repaired
- SAP XI
- hdfs的shell命令
- 几个关于Service的知识点
- pta--七桥问题
- 面试冒泡排序
- 解决 MySQL 的 Table is marked as crashed and should be repaired 问题
- DDL、DML和DCL的理解
- php不定参数方法(函数)和可选参数方法(函数)
- 跟我一起学Multiple View Geometry多视图几何(6)
- 欢迎使用CSDN-markdown编辑器
- hdu 5066 Harry And Physical Teacher(物理)
- Android上的简单图像合成类——PorterDuffXfermode
- 数据库关系模式题型大全
- 装饰器