简体   繁体   English

在percona xtradb集群中重置主服务器

[英]reset master in percona xtradb cluster


I have two pxc clusters each consisting of 3 mysql servers. 我有两个pxc群集,每个群集由3个mysql服务器组成。
PXC1(node1,node2,node3) has db1 and db2, and PXC2(node4,node5,node6) has db2 and db3. PXC1(node1,node2,node3)具有db1和db2,而PXC2(node4,node5,node6)具有db2和db3。
I've setup a gtid based replication between pxc1(node1) and pxc2(node3). 我已经在pxc1(node1)和pxc2(node3)之间设置了基于gtid的复制。

Now the replication failed as master(pxc1) has purged gtids that needed for pxc2. 现在复制失败,因为master(pxc1)已清除pxc2所需的gtid。 I've gone through many blogs and forums. 我浏览了许多博客和论坛。 Everyone suggested to change the gtid_purged value after running the command reset master in slave. 每个人都建议在从站中运行命令reset master后更改gtid_purged值。

But, in pxc cluster reset master is not allowed. 但是,在pxc群集中不允许使用master重置。 Is there any solution to fix the replication. 是否有解决复制的任何解决方案。

You will need to stop the Galera replication on the cluster 2 and then perform reset master. 您将需要在集群2上停止Galera复制,然后执行重置主服务器。 The simplest way is stop all MySQL nodes on the cluster 2 except for the slave node and then comment out the wsrep_provider variable in your my.cnf or Galera related config file and restart the slave node. 最简单的方法是停止群集2上除从属节点之外的所有MySQL节点,然后在my.cnf或Galera相关的配置文件中注释掉wsrep_provider变量,然后重新启动从属节点。 Then you should be able to run reset master. 然后,您应该能够运行Reset Master。 Once that's all done then start other nodes one by one. 一旦完成所有操作,然后一个接一个地启动其他节点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM