码迷,mamicode.com
首页 > 数据库 > 详细

mysqldump造成sql_thread停止

时间:2017-12-14 18:00:01      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:was   restart   and   relay   body   color   包含   position   top   

利用从库备份期间,收到slave sql_thread stop的报警,检查状态如下:

(1)show slave status输出

Relay_Master_Log_File: mysql-bin.009188

Slave_IO_Running: Yes
Slave_SQL_Running: No

(2)error log输出

2017-12-13 10:35:14 61080 [Note] Error reading relay log event: slave SQL thread was killed
2017-12-13 10:44:02 61080 [Note] Slave SQL thread initialized, starting replication in log ‘mysql-bin.009188‘ at position 85266734, relay log ‘./relay-bin.017692‘ position: 85266897

对应mysqldump手册检查备份脚本

脚本包含--dump-slave=2 (备份带有注释的change master)

参数解释中有一句话

This option causes mysqldump to stop the slave SQL thread before the dump and restart it again after.

结论:就是备份前stop slave,备份结束再start slave;

mysqldump造成sql_thread停止

标签:was   restart   and   relay   body   color   包含   position   top   

原文地址:http://www.cnblogs.com/geek-ace/p/8038662.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!