Mysql Table 'xx' is marked as crashed and should be repaired

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,直接訪問應用就可以正常使用了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章