美文网首页
mysql主从同步常见问题

mysql主从同步常见问题

作者: 嘿嘿逗 | 来源:发表于2018-12-25 17:58 被阅读0次

The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. (server_errno=1236)
这个应该是由于你在主库上执行过purge binary logs,然后当从库change master的时候,却要执行那些事务。
你可以在主库上先查找哪些gtid被purge了。
show global variables like 'gtid_purged';
然后拿着这个value,去从库上依次
stop slave;
set global gtid_purged = 'xxx'; # xxx是你主库上查到的value。
start slave;
这样能跳过执行被主库已经purge的事务了。
但是有时候是因为数据库还原不完整造成的,还原完了数据库要注意一下是否完整。

相关文章

网友评论

      本文标题:mysql主从同步常见问题

      本文链接:https://www.haomeiwen.com/subject/gxpgkqtx.html