一位朋友说他的Discuz论坛没了,网站可以打开,但是文章都没了,怀疑被黑。我们登陆客户 Discuz论坛 后没发现被黑迹象,然后进入 MySQL 数据库发现 Table ‘./ultrax/forum_posts’ is marked as crashed and should be repaired 错误,因为 forum_posts 表被损坏了,所以 Discuz 的文章都显示不出来:
# mysql -u root -p
Enter password:
mysql> use ultrax;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from wp_posts;
ERROR 145 (HY000): Table './ultrax/forum_posts' is marked as crashed and should be repaired
mysql> Bye
修复 MySQL 数据库数据表问题可以由 mysqlcheck 来解决,先用 mysqlcheck 查看一下:
# mysqlcheck -u root -p ultrax
Enter password:
然后添加 –auto-repair 参数自动修复,最好修复前备份一下数据库:
# mysqldump -u root -p ultrax > ultrax.sql
Enter password:
# mysqlcheck -u root -p ultrax --auto-repair
Enter password:
Repairing tables
wordpress.wp_commentmeta OK
wordpress.wp_comments OK
wordpress.wp_links OK
wordpress.wp_options OK
wordpress.wp_postmeta OK
wordpress.wp_posts OK
wordpress.wp_term_taxonomy OK
wordpress.wp_terms OK
wordpress.wp_usermeta OK
wordpress.wp_users OK
原文地址:
http://www.tngou.net/blog/show/437该贴被tngou编辑于2015-3-3 9:24:23
该贴由system转至本版2015-3-3 14:09:59