The following articles mainly introduce the actual operation process of MySQL multi-level synchronization. We first list the multi-level synchronization, backup, and server arrangement, to describe the actual operation process of MySQL multi-level synchronization. The following articles will provide you with relevant knowledge.
Multi-level synchronization, backup, and server arrangement:
A-> B-> C
Between A and B, A is the Master, and B is the Slave.
Between B and C, B is the Master, and C is the Slave.
The most important thing here is B, which is both Slave and Master.
Add the following two lines to my. cnf:
- # Binary logging-not required for slaves, but recommended
- Log-bin = mysql-bin
- Log-slave-updates
Enable mysql-bin and synchronously update mysql-bin while updating Slave.
Only in this way can C be updated simultaneously when A is updated. The above content is an introduction to MySQL multi-level synchronization. I hope you will have some gains.