I've searched around, but can't find the exact details to point me in the proper direction. I currently have 2 MySQL instances under 5.5.41 running as a master-slave setup. I followed these directions to set it up. Since both of these nodes are on the same VM storage I'd like to migrate one to a different datacenter as a master-master config then use JDBC load balancing where the current master is primary and the slave is converted to a secondary master with replication enabled between both. Can anyone provide the steps I'd need to perform on the MySQL nodes? I believe I now the correct JDBC line to use for my app connection.

1 Answer 1


Master-Master has a lot of problems if you are writing to both. It is better to write to only one of them until you need to failover.

Setting up Dual-Master is simply setting up both servers as being both Master and Slave, much like you already did to make your current Master-Slave topology.

  • I am also thinking about settings up master-master replication. Could you please list some of the problems? I know I need to set auto increment properly so there is no conflict in auto incremented numbers. What else?
    – Allen King
    Commented Jul 1, 2017 at 4:15
  • Other sources of duplicate keys. Split brain. If something goes wrong; replication stops until you manually fix it. You don't get write scaling.
    – Rick James
    Commented Jul 1, 2017 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.