1

I am trying to implement a master-master replication between 3 MySQL Databases running on 3 different servers.

I implemented master-master replication for 2 servers, but can't figure out how can I implement if for 3 different MySQL Servers.

Does anyone know how to accomplish this?

Linger
  • 251
  • 3
  • 9
  • 24
Mahendra Liya
  • 339
  • 1
  • 5
  • 13
  • 1
    I have some advice. Don't do it. You'll regret it later. This configuration is incredibly unstable and increases your points of failure. – Aaron Brown Mar 25 '12 at 01:53

1 Answers1

2

You have to set it up as a ring -- A is the master for B, B is the master for C, and C is the master for A. And don't forget to set the log_slave_updates option so that they will pass on upstream changes, and set replicate-same-server-id to 0 so that the updates won't go round and round the ring for ever.

Read this article -- the ring configuration is described on page 2.

Mike Scott
  • 7,903
  • 29
  • 26
  • I used your suggestions with a few alteration and I was successful in implementing the required replication... Thanks. – Mahendra Liya Mar 26 '12 at 08:02
  • I'd like to know your comments, too, on the comment posted by @Aaron? (I may post another question for the same). Thanks in advance – Mahendra Liya Mar 26 '12 at 08:04
  • I've never actually used this configuration for a production service, so I can't really add anything except to point out that because it's a ring then if any one instance fails then your replication will fail globally. – Mike Scott Mar 26 '12 at 08:22
  • ah... I understand what you say! Do you think "MySQL Cluster" can serve my purpose? – Mahendra Liya Mar 26 '12 at 12:22