1

I have wordpress site using 3 mysql replication. Master-master replication and 1 slave. Now have problem with the slave. When Master update posting from XMLRPC, the slave is not getting update too. This is happen a few days ago, before that is working fine and beside that at other server that using Master-Master replication is working fine too.

I can't find any error message as If I create new post or update it not from XMLRPC, the replication in slave is working fine.

I don't know what happen before got this problem but as long as I know, the last thing that I did was update wordpress to version 3.4. But if this the cause why at master-master replication still working fine as all site using version 3.4 too?

By the way, I saw at master there were a lot of transfer data from slave, compare from other slave server that using master/slave. About 288MB incoming data from slave.

2136K  288M ACCEPT     tcp  --  *      *       xx.14.xx.107       0.0.0.0/0           tcp dpt:3306
272K   14M ACCEPT     tcp  --  *      *       xx.18.xx.36         0.0.0.0/0           tcp dpt:3306

edit:

I just solve my own problem :D

My configuration are 3 server. A and B are master-master replication and C is slave-master with A. My problem is because from XMLRPC server (D) resolve my domain to server B when create/update posting (I'm using single domain) so It's seem can't update slave C if is not from A. I'm forget that I was moving to new server D too.

I don't know if it's normal that Slave C only can be updated from A if using XMLRPC but at least solve my problem. :D

4

2 回答 2

0

查看您的“解决方案”,我可以告诉您您的复制有问题

如果 A 和 B 是真正的主-主,则对 B 的写入将复制到 A。如果 C 是 A 的从属,则对 A 的所有写入也会复制到 C。

我怀疑你在 mysql 中的服务器“server-id”设置是错误的。IE C 和 B 具有相同的服务器 ID。

可能是您的 auto_increment_increment 未设置为 2(2 个写入主机所需的最小值),或者您的 auto_increment_offset 在每个写入主机上都没有不同。我怀疑如果是其中任何一个,您的复制将在您写入两台服务器时被破坏,并且您已经看到了这个问题。

于 2013-07-08T14:29:32.027 回答
0

在这种情况下,您需要将 log-slave-updates 添加到 A。默认情况下,MySQL 复制不会将它从主服务器接收到的任何语句记录到复制日志中。每当您使用菊花链复制时,您需要确保服务器记录这些内容,以便将它们发送到它的从属服务器。

http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_log-slave-updates

于 2013-09-18T16:12:15.597 回答