I am in the process of setting up Master - Master replication between 2 servers on a production environment. My settings are as follows,
Existing System:
Server 1:
Status: Master
databases: db1, db2 & db3.
operation: Read & write.
Server 2:
Status: Slave
databases: db4 & db5.
operation: Read & write.
Requirement:
Need to set up master - master replication - db2 depend on db5. so I need to replicate db5 to server 1 and db4 depends on db3 so I need to replicate db1 to server 2.
Proposed System:
Server 1:
Status: Master
database: db1, db2, db3, (db4 & db5).
operations:
db1, db2 & db3: Read & write.
db4 & db5 : Read only.
configuration:
Server_id = 1.
replicate-ignore-db = db1
replicate-ignore-db = db2
replicate-ignore-db = db3
Server 2:
Status: Master
database: db4, db5, (db1, db2 & db3).
operations:
db4 & db5 : Read & write.
db1,db2,db3 : Read only.
configuration:
Server_id = 2.
replicate-ignore-db = db4
replicate-ignore-db = db5
The overall concept is, I use replicate-ignore-db
to ignore the databases which are already exist in the system. I have to do this configuration on the production environment. My questions are,
- Whether the proposed configuration is correct?
- Can we set up this configuration without downtime?
- Is there any other variables which I need to consider?
- What precautions do I need to take before starting this configuration?
- Is there any other alternative to achieve my requirement?
Thanks in advance.