This is a pictorial view of what I have:
Master 1<----->Master 2
| |
| |
V V
Slave 1 Slave 2
The masters are never written to at the same time, rather Master 2 is a standby server. Both Masters have log-slave-updates
turned on in my.cnf
.
If a table is created in a replicated DB on Master 1, it is present on Master 1, Master 2 and Slave 1. It is NOT present on Slave 2.
In the same way, if a table is created in a replicated DB on Master 2, it is present on Master 1, Master 2 and Slave 2. It is NOT present on Slave 1.
Why is this the case? Is it a limitation of MySQL in how it stops master/master replicated servers from creating replication loops if both have log-slave-updates turned on?
Is there a way this can work?
binlog_do_db
containing only one database. That database is the one the table is being created in.binlog_do_db
has some limitations of what it can recognise (dev.mysql.com/doc/refman/5.7/en/…). Try to remove that and see if it works the way you want it. If you do need some filtering usereplication-do-db
on the slave instead. It's more advantageous from many perspective.