【mysql断电重启后修复myisam表错误】fix_myisam_table.sh
#!/bin/bash # # 2014/10/13 fix_bin=‘/usr/bin/myisamchk‘ d_db_data=‘/data/mysql_data/3306‘ dt=`date +"%y%m%d"` cd ${d_db_data} echo ‘>>===========================‘ tail `hostname`.err -n 200 |grep $dt |grep "Checking table" |awk ‘{print $NF}‘ echo ‘----------------------------------------------------‘ tail `hostname`.err -n 200 |grep $dt |grep "Checking table" |awk ‘{print $NF}‘ |xargs -i ${fix_bin} {} echo ‘<<===========================‘
【mysql断电重启后修复myisam表错误】fix_myisam_table.sh
原文地址:http://nosmoking.blog.51cto.com/3263888/1594787