MySQL:Table XXX is marked as crashed and should be repaired
程序员文章站
2022-05-07 14:43:22
...
错误: mysql select * from t_intro; ERROR 145 (HY000): Table './imms_core/t_intro' is marked as crashed and should be repaired 解决: [root@iZ232s4zbqvZ ~]# myisamchk -c -r /var/lib/mysql/imms_core/t_intro.MYI - recovering (with sort) MyIS
错误:
mysql> select * from t_intro;
ERROR 145 (HY000): Table './imms_core/t_intro' is marked as crashed and should be repaired
解决:
[root@iZ232s4zbqvZ ~]# myisamchk -c -r /var/lib/mysql/imms_core/t_intro.MYI
- recovering (with sort) MyISAM-table '/var/lib/mysql/imms_core/t_intro.MYI'
Data records: 183
- Fixing index 1
Found block that points outside data file at 437808
[root@iZ232s4zbqvZ ~]#
=============================================================================
问题:
130619 17:10:15 [Note] /usr/libexec/mysqld: ready for connections.Version: '5.1.47' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
130619 17:10:45 [ERROR] /usr/libexec/mysqld: Table './cacti/syslog_incoming' is marked as crashed and should be repaired
解决:
1. 进入管理mysql的phpmyadmin
2. 在左则选中自己的数据库
3. 在右则勾选中错误信息中的那个'syslog_incoming'表
4. 滚动屏幕到下面,有个下拉菜单(With selected:),选择”修复表”
修改之后,并没有发现有什么数据损失,连忙备份了一份数据库到其它地方,备份还是很重要的!
使用MySQL的命令也可以解决:
找到mysql的安装目录的bin/myisamchk工具,在命令行中输入:
myisamchk -c -r /var/lib/mysql/cacti/syslog_incoming.MYI
然后myisamchk 工具会帮助你恢复数据表的索引。
推荐阅读
-
Table ‘xxx’ 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_MySQL
-
Table'./mysql/user'is marked as crashed and should be repa_MySQL
-
mysql table is marked as crashed and last (automatic?) repai
-
MYSQL is marked as crashed and should be repaired解决办法
-
mysql错误:Table XXX is marked as crashed and should be repai
-
mysql table is marked as crashed and last (automatic?) repai
-
速解决MySQL “is marked as crashed and should be repaired”故障
-
数据库崩溃-mysql数据库常常出现 table XXX is marked crashed and should be repaired