mysql报如下错误
191224 10:38:22 [ERROR] /opt/zbox/run/mysql/mysqld: Table './zentao/zt_action' is marked as crashed and should be repaired
解决办法:
1、找到mysql安装bin目录,如果不知道全局搜索文件(find -name 'myisamchk' /)
>> find / -name 'myisamchk'
find: ‘/proc/14995/task/2643’: No such file or directory
/usr/bin/myisamchk
2、重新修复索引
>> /usr/bin/myisamchk -c -r zt_action.MYI
- recovering (with sort) MyISAM-table 'zt_action.MYI'
Data records: 11453
- Fixing index 1
Found block that points outside data file at 597988
Found block that points outside data file at 598004
- Fixing index 2
3、不用重启mysql,直接访问应用就可以正常使用了