Chinaunix首页 | 论坛 | 博客
  • 博客访问: 170474
  • 博文数量: 159
  • 博客积分: 7007
  • 博客等级: 准将
  • 技术积分: 1750
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-17 15:05
文章分类

全部博文(159)

文章存档

2010年(39)

2009年(106)

2008年(14)

我的朋友

分类: LINUX

2009-07-18 11:40:21

今天上服务器一看,发现网页错误,无法连接数据库服务器。mysql服务自己down掉了,然后重新启动服务器,发现网页无法打开,提示: 

[mysql]Table tblName is marked as crashed and should be repaired

Mysql提示tblName表格已损坏,需要修复,解决方法:

[root@mysqlserver ~]#more /var/log/mysqld.log

 




090718 11:22:07 [ERROR] /usr/libexec/mysqld: Table 'ware' is marked as crashed and should be repaired

090718 11:22:07 [ERROR] /usr/libexec/mysqld: Sort aborted

090718 11:23:42 [ERROR] /usr/libexec/mysqld: Table 'ware' is marked as crashed and should be repaired

090718 11:23:42 [ERROR] /usr/libexec/mysqld: Sort aborted

090718 11:24:01 [ERROR] /usr/libexec/mysqld: Table 'ware' is marked as crashed and should be repaired

090718 11:24:01 [ERROR] /usr/libexec/mysqld: Sort aborted

090718 11:25:19 [ERROR] /usr/libexec/mysqld: Table 'ware' is marked as crashed and should be repaired

090718 11:25:19 [ERROR] /usr/libexec/mysqld: Sort aborted


进入到对应的数据库目录:

[root@mysqlserver ~]# cd /var/lib/mysql/dbname

 使用myisamchk修复:

[root@mysqlserver mysql]# myisamchk -r tblName

阅读(867) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~