码迷,mamicode.com
首页 > 其他好文 > 详细

Table is marked as crashed and should be repaired

时间:2016-06-13 11:30:17      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

 

错误如下:

hibernate operation: could not execute query; uncategorized SQLException for SQL [select count(*) as y0_ from customer this_ where this_.customer_type=? order by this_.id desc]; SQL state [HY000]; error code [1194]; Table ‘this_‘ is marked as crashed and should be repaired; nested exception is Java.sql.SQLException: Table ‘this_‘ is marked as crashed and should be repaired

 

解决方法:

 

Table ‘./Tablename/posts‘ is marked as crashed and should be repaired

提示说论坛的帖子表posts被标记有问题,需要修复。我记得以前也出现过类似的问题,但是只要点击Phpmyadmin上的repair按纽就自动修复了,但是这次很绝,什么都没有.于是赶快上网查找原因。最终将问题解决。解决方法如下:

找到MySQL的安装目录的bin/myisamchk工具,在命令行中输入:

myisamchk -c -r ../data/tablename/posts.MYI

然后myisamchk 工具会帮助你恢复数据表的索引。好象也不用重新启动mysql,问题就解决了。

 

各位如果遇到也可以这么解决。

Table is marked as crashed and should be repaired

标签:

原文地址:http://www.cnblogs.com/water-sky/p/5579789.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!