I’ve got a single table in a master DB that I would like to replicate to multiple databases on one slave server. Like this:
masterDB.tableA -> slaveDB1.tableA
masterDB.tableA -> slaveDB2.tableA
slaveDB1 and slaveDB2 are on the same slave server. Is this possible?
I can get slaveDB1’s replication working no problem, but it’s as it it’s ignoring the command in my.cnf for slaveDB2:
replicate-rewrite-db="masterDB->slaveDB1"
replicate-rewrite-db="masterDB->slaveDB2"
replicate-wild-do-table=slaveDB1.tableA%
replicate-wild-do-table=slaveDB2.tableA%
Am I missing something, or can this just not be done with replication?
From the docs
This suggests it won’t work as it will only take into account the first of your two replicate-rewrite-db options (which is the behaviour you’re seeing).