mysql:Table 'xxxxx' is marked as crashed and should be repaired
来源:互联网 发布:手机淘宝客户端删评价 编辑:程序博客网 时间:2024/05/29 11:56
MYSQL的MyISAM出了两次问题了,两次都是报Table 'xxxxx' is marked as crashed and should be repaired,上次是另外一个数据库,这次是这个数据库,弄得我有点郁闷,我们公司上千万上亿的数据都用MYSQL,照样说MYSQL应该蛮不错的,业界的评论也是不错,怎么到我手里面就老出问题了,不过我自己确实对MYSQL的优化不怎么懂,基本上都是默认设置,网上有人说isam比较容易出现类似错误,innodb出错的机率要小得多,我选择的就是ISAM,MY GAGA。以下说说步骤:
1、先找到日志文件,日志文件所在目录为/var/log/mysql/error.log,报错信息如下:
Version: '5.1.41-3ubuntu12' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
110314 17:36:29 [ERROR] /usr/sbin/mysqld: Table './xxxx/xxxx' is marked as crashed and should be repaired
110314 17:36:29 [Warning] Checking table: './xxxx/xxxxarchives'
2、这里恢复我先使用了一个其本身所带的工具:myisamchk,先找到数据库所在位置:/var/lib/mysql,里面可以看到所有的数据库文件,每一个文件夹就代表一个数据库,其中再存放所有的表,先采用命令:
myisamchk -f xxxx/*.MYI
感觉好像是没有效果,不过数据表没有往错误的方向发展,还是不能够生成静态页面(我采用的DEDECMS不知道为什么就不能够生成静态页面了),但是数据还能够正常访问。
这里需要注意的是,在做修复之前先关闭数据库的连接,否则会报如下的错误:
myisamchk: warning: 1 client is using or hasn't closed the table properly
3、再采用命令:
myisamchk -c -r xxxx/*.MYI
结果访问页面的时候,数据库发生问题了,所了如下错误:
Error infos: Incorrect key file for table './xxxx/*.MYI'; try to repair it
心想这个完蛋了,心理那个是一阵凉呀。
4、赶紧采用另外一个命令再试试:
mysqlcheck -aro xxxx -uusername -ppassword
打出如下信息:
xxxx.A OK
xxxx.B OK
xxxx.C OK
然后再访问一下页面,终于又可以把数据查出来了,看来DEDECMS不能够生成页面的问题不在于此,需要到DEDE的官网去咨询了。
本文出自:冯立彬的博客
- Mysql断电mysql:Table 'xxxxx' is marked as crashed and should be repaired
- mysql:Table 'xxxxx' is marked as crashed and should be repaired
- Table '.\xxxxx\xxxx' 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
- mysql错误:is marked as crashed and should be repaired
- mysql错误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
- mysql错误:Table XXX is marked as crashed and should be repaired
- mysql Table 'XXX' is marked as crashed and should be repaired
- mysql 数据库程序出现Table xxx is marked as crashed and should be repaired
- PE文件格式
- 关于分页优化
- C#中类型转换
- 程序员的成长从开窍开始
- USACO 1.1 四道题目
- mysql:Table 'xxxxx' is marked as crashed and should be repaired
- JDBC 连接SQLServer 错误总结
- 离职前部门聚餐
- 10 iOS Libraries to Make Your Life Easier
- 2011年的11个网页设计趋势热点
- jsf配置问题 Error performing conversion of value ' of type class java.lang.String to type class
- POJ 3750 小孩报数问题
- 今天看到的一个评论,就一对联。
- 未来几年上市潮的看法