盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

详细说明在线上MYSQL同步报错故障处理方法代码总结

时间:2025/3/15作者:未知来源:盾怪网教程人气:

[摘要][ "$Errno" -eq 1008];then #忽略此些错误$MYSQL_CMD-e "stopslave;set global sql_slave_skip_c...
[ "$Errno" -eq 1008 ];then #忽略此些错误 $MYSQL_CMD -e "stop slave;set global sql_slave_skip_counter=1;start slave;" echo "Cause slave replication catch errors,trying skip counter and restart slave;stop slave ;set global sql_slave_skip_counter=1;slave start;" >> $SlaveStatusFile MailTitle="[Warning] Slave error on $HOST_IP $HOST_PORT! ErrNum: $Errno" else echo "Slave $HOST_IP $HOST_PORT is down!" >> $SlaveStatusFile MailTitle="[ERROR]Slave replication is down on $HOST_IP $HOST_PORT ! ErrNum:$Errno" fi fi if [ -n "$Behind" ];then Behind=0 fi echo "$Behind" >> $SlaveStatusFile #delay behind master 判断延时时间 if [ $Behind -gt 300 ];then echo `date +"%Y-%m%d %H:%M:%S"` "slave is behind master $Bebind seconds!" >> $SlaveStatusFile MailTitle="[Warning]Slave delay $Behind seconds,from $HOST_IP $HOST_PORT" fi if [ -n "$MailTitle" ];then #若出错或者延时时间大于300s则发送邮件 cat ${SlaveStatusFile}

关键词:详细说明在线上MYSQL同步报错故障处理办法代码总结




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版