Welcome to WebmasterWorld Guest from 54.224.46.77

Forum Moderators: open

Message Too Old, No Replies

mysql dual master multi-slave setup

     
4:11 am on Jun 24, 2013 (gmt 0)

New User

10+ Year Member

joined:July 30, 2004
posts: 18
votes: 0


hello fellow mysql admins!

I have a question you guys may the answer to.

I am familiar with single master to multi slave setup. I am also familiar with dual master setup.

However, I want to ask you:

Is it possible to have a dual master with each master having their own slaves?


from my initial testing, I got a dual master setup and one of the master (M1) has slaves.

what I noticed is that if I update records in M1, the slaves and M2 are updated. But if I edited from M2, only M1 is updated. M1 slaves are not updated.

I am on mysql 5.1.x

Any way to fix this?

thanks
11:24 am on June 24, 2013 (gmt 0)

New User

10+ Year Member

joined:July 30, 2004
posts: 18
votes: 0


nevermind. I found it. 1 word: log-slave-updates
5:08 pm on June 26, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
posts:3416
votes: 0


Glad you got it sorted and thanks for posting back with your solution, soned! :)
5:00 am on June 27, 2013 (gmt 0)

New User

10+ Year Member

joined:July 30, 2004
posts: 18
votes: 0


based on testing log-slave-updates, however, there is a problem with the way they log.

In my setup, I only enabled it on M1. M2 does not have it because:

that flag will write to binlog all the master and slave changes. since M1 and M2 are both master and slave... both of them will keep logging each other in an endless cycle.

unless someone can share a way to not write to binlog those queries you already writted to the slave binlog

or maybe i did something wrong?
3:10 pm on June 28, 2013 (gmt 0)

New User

10+ Year Member

joined:July 30, 2004
posts: 18
votes: 0


oops this was just my assumption. right now M2 does not have slaves so I can't tell of it will be a problem, i just noticed that if log-slave-updates is On in M2, the M2 binlog is adding data from its slave writes