I want to setup 2 node master-master replication. Im aware of the point of failiures in this replication. Its a huge database around 1.5TB. Heavy OLTP is going on. But its mandatory to implement right now.
I have 2 servers.
1. Master1
2. Master2
Initially what I did is,
Master1:
Make changes my.cnf for replication.
Take mysqldump with --master-data=2 (For getting exact binlog position)
Master2:
Restore dump to Master2.
Make changes on my.cnf.
set replication to Master1 (Change master='Master1').
Start Slave.
Now Master1 is replicating to Master2.
Then I need to replicate the Master2 to Master1
.
Just take the binlog position and set replication on Master1 will work, but the problem is binog file and position is changing frequently.
So before execute the Change master command on Master1 the binog get changed.
How can I achive this without downtime.