MySQL报错Slave: received end packet from server, apparent master shutdown

MySQL 一台从库的错误日志,大量报下面的错误信息


2018-11-16 15:11:12 10951 [Note] Slave: received end packet from server, apparent master shutdown: 
2018-11-16 15:11:12 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 255843250
2018-11-16 15:11:12 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
2018-11-16 15:20:09 10951 [Note] Slave: received end packet from server, apparent master shutdown: 
2018-11-16 15:20:09 10951 [Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.000369' at position 276447773
2018-11-16 15:20:09 10951 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.

这套DB有三台从库,而主库上面通过命令只能看到两台从库


root [(none)]> show slave hosts;
+-----------+------+------+-----------+--------------------------------------+
| Server_id | Host | Port | Master_id | Slave_UUID                           |
+-----------+------+------+-----------+--------------------------------------+
|   1373324 |      | 3324 |    174144 | 5dfa3e4b-df15-11e8-8c37-06cbe47ccefb |
|    174192 |      | 3306 |    174144 | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c |
+-----------+------+------+-----------+--------------------------------------+
2 rows in set (0.00 sec)

到缺少的那台从库上面检查server-id,看有没有和其他从库相同

server-id并不相同


mysql> show global variables like 'server%id%';
+----------------+--------------------------------------+
| Variable_name  | Value                                |
+----------------+--------------------------------------+
| server_id      | 2461620                              |
| server_id_bits | 32                                   |
| server_uuid    | b24e27f0-dce5-11e8-bdf4-0cc47a397e1c |
+----------------+--------------------------------------+
3 rows in set (0.00 sec)

排除了server-id,还有可能是DB的uuid相同而导致从数据库注册不到主库。

删除数据库目录下面的server-id文件


# cd /disk1/mysql3320
# cat auto.cnf 
[auto]
server-uuid=11478f92-e973-11e8-8fcf-0cc47a663554
# rm auto.cnf

之后重启问题从库,报错消失。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-2220426/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26506993/viewspace-2220426/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值