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
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? 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. Jul 1, 2017 at 16:25