This is a discussion on Master -> Slave/Master -> Slave problem. within the MySQL General forum forums, part of the MySQL category; --> I'm working with two distinct databases on four different boxes. Databases A on Server A needs to be present ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm working with two distinct databases on four different boxes. Databases A on Server A needs to be present everywhere (Server B, C and D). Database B needs to be present on Server C. So I setup replication from Server A to Server B and Server D and then I setup replication from Server B to Server C (to include the tables that were replicated from Server A). So when a change is made in Database A I see it roll over to B and C. But nothing replicated to B ever gets re-replicated to D. It would be optimal if I could slave from two distinct masters but from reading this doesn't seem possible. Server A: log-bin=/datastore/mysql-log/repl binlog-do-db=clients server-id=1 Server B: log-bin=/datastore/mysql-log/repl binlog-do-db=clients binlog-do-db=datastore server-id=21 master-host=testdba.local master-user=testdbareader master-password=passworda master-connect-retry=60 replicate-do-db=clients Server C: server-id=22 master-host=testdba.local master-user=testdbareader master-password=passworda master-connect-retry=60 replicate-do-db=clients Server D: server-id=24 master-host=testdbb.local master-user=testdbbreader master-password=passwordb master-connect-retry=60 replicate-do-db=clients replicate-do-db=data what can I do to fix this? Gary |
| |||
| Hi, on server B you need to set log-slave-updates to pass statements from A over B to D. BTW: I can recommend you to use replicate-wild-do-table=db_name.* instead of replicate-do-db, otherwise statements with db prefix before tables won't replicate over B to D. RTM please Filip > I'm working with two distinct databases on four different boxes. > Databases A on Server A needs to be present everywhere (Server B, C and > D). Database B needs to be present on Server C. > > So I setup replication from Server A to Server B and Server D and then I > setup replication from Server B to Server C (to include the tables that > were replicated from Server A). > > So when a change is made in Database A I see it roll over to B and C. > But nothing replicated to B ever gets re-replicated to D. It would be > optimal if I could slave from two distinct masters but from reading this > doesn't seem possible. > > Server A: > > log-bin=/datastore/mysql-log/repl > binlog-do-db=clients > server-id=1 > > Server B: > > log-bin=/datastore/mysql-log/repl > binlog-do-db=clients > binlog-do-db=datastore > > server-id=21 > master-host=testdba.local > master-user=testdbareader > master-password=passworda > master-connect-retry=60 > replicate-do-db=clients > > Server C: > > server-id=22 > master-host=testdba.local > master-user=testdbareader > master-password=passworda > master-connect-retry=60 > replicate-do-db=clients > > Server D: > > server-id=24 > master-host=testdbb.local > master-user=testdbbreader > master-password=passwordb > master-connect-retry=60 > replicate-do-db=clients > replicate-do-db=data > > what can I do to fix this? > > Gary > -- Filip Krejci <krejcif@gmail.com> Q: How many Linux users does it take to change a lightbulb? A: Two. One to write the HOWTO-LIGHTBULB-CRONJOB, and another to read it. |
| ||||
| > Hi, > > on server B you need to set log-slave-updates to pass statements from A > over B to D. > > BTW: I can recommend you to use replicate-wild-do-table=db_name.* > instead of replicate-do-db, otherwise statements with db prefix before > tables won't replicate over B to D. RTM please > > > Filip > Filip, Someone sent me the log-slave-updates offlist and I managed to get it working. I will definitely explore the replicate-wild option. This is purely a test environment at this time. Thanks, Gary |