程序报错
Table '.xxxx' is marked as crashed and should be repaired
1.首先关闭mysql服务
service stop mysql
2.使用mysiamchk修复
root@10-10-74-251:/data/mysql_data/cmd5# myisamchk -r -f t_counter.MYI
– recovering (with sort) MyISAM-table ‘t_counter.MYI’Data records: 0
– Fixing index 1
myisamchk: error: myisam_sort_buffer_size is too small
MyISAM-table ‘md5_core.MYI’ is not fixed because of errors
Try fixing it by using the –safe-recover (-o), the –force (-f) option or by not using the –quick (-q) flag
myisamchk -r -f t_counter.MYI --s
3.修复时发现报: myisam_sort_buffer_size is too small,在修复命令后面加参数,增大排序缓存,修复成功
myisamchk -r -f t_counter.MYI --sort_buffer_size=10G