We use several replicated database servers to make these changes.
In our case, db1 is the master replicated to db2 . (Db1-> db2).
Let's start by changing to db2. If everything is blocked, replication will stop, but that's OK.
Move your traffic to db2. Any remaining traffic going to db1 will be repeated, so you won’t lose anything.
Once there is no traffic on db1, rebuild it as a slave of db2 (db2-> db1).
This is a general idea, and you get very little downtime, and you don’t need to pull everything! In fact, we have three servers, so it is a little more complicated, but not much.
Good luck.
source share