I have 4 servers: A, B, C and D.
A and B are in a master-master setup.
C is a slave to B and D is a slave to C.
Changes on A or B get to all nodes other than D. I need them to get to D
Changes on C get to D but obviously they don't go to A or B which is fine.
After some reading I found that I needed the log-slave-updates option set on C, this way C would log the changes replicated to it and then D could read those and make the same updates.
I have set the option to on and D is waiting for it's master to send events but changes from A or B are still not getting to D.
Best Answer
With log-slave-updates on server C, only updates written directly on B will go to server D.
Server A and Server B require log-slave-updates, otherwise, none of their updates will reach C. In general, any Master that is also a Slave must have log-slave-updates in order to relay binlog events from distant servers.
I have discussed this before
Restarting mysqld is required on servers A and B for the setting to take effect
Let me explain further
Your Setup
You run
INSERT INTO tblname
on Server A what happens ?Since B is Slave of A
INSERT INTO tblname
INSERT INTO tblname
INSERT INTO tblname
itINSERT INTO tblname
into its binary logs. C's IO Thread never seesINSERT INTO tblname
coming from server A.You run
INSERT INTO tblname
on Server B what happens ?Since A and C Slaves of B and D is a Slave of C
INSERT INTO tblname
INSERT INTO tblname
INSERT INTO tblname
itINSERT INTO tblname
INSERT INTO tblname
INSERT INTO tblname
itINSERT INTO tblname
in its binary logsINSERT INTO tblname
INSERT INTO tblname
INSERT INTO tblname
itBased on this description, if you had any slaves coming from A, those slaves would never see
INSERT INTO tblname
coming from B.Therefore, you need log-slave-updates on A and B as well as C.