This method only works if the database is empty. If the database is not empty, then replication should be restored as described below. |
|
For a simple master slave installation, the above commands will be input only once.
For Master-Master replication with two additional slaves, the replication is setup as follows:
What | Master | Slave |
---|---|---|
Replicate the first master to the second master. | acd-dbm1 | acd-dbm2 |
Replicate the second master to the first master. | acd-dbm2 | acd-dbm1 |
Replicate the first master to the first slave. | acd-dbm1 | acd-dbs1 |
Replicate the second master to the second slave. | acd-dbm2 | acd-dbs2 |
If the master is not empty, then use one of the following pages to reconstruct replication:
Restore MySQL Master Slave Replication
Restore MySQL Master-Master Replication