Brother has something to say

MySQL > MySQL > MySQL > MySQL > MySQL > MySQL > MySQL > MySQL Today we will talk about how to master slave copy, agree with the small thumbs-up, in the view of the brush up. If you think you can learn something from brother’s article, please recommend brother to your friends. Sharing is a happy thing, let’s play Java together.

MySQL primary/secondary replication

Introduction to the

MySQL master/slave Replication is also called Replication. In simple terms, there are two machines, A and B, where A is the master and B is the attendant. A writes whatever data A writes, AND B writes whatever data.

Application scenarios (stay tuned for these articles)

  • Reading and writing separation
  • Data is backed up in real time for hot backup
  • High availabilityHA
  • Architecture expansion, separate libraries and separate tables

Architecture diagram

  • One-way master-slave

One master, one servant


  • From more than a master

One master, many servants


  • Are master-slave

Both machines can write data, and both machines are masters and servants


  • The Lord and from much
  • Cascaded dual-master replication logical architecture

In cascading replication mode, data synchronization of some slaves is not connected to the master node but to the slave node. Because a master node with too many slave nodes will lose some of its performance for replication, we can have 3 to 5 slave nodes connected to the master and the other slave nodes connected to the slave nodes as secondary or tertiary nodes, which not only relieves the stress on the master node, but also has no negative impact on data consistency.

Brother epilogue

MySQL master-slave replication (MASTER-slave replication) is one of the most common types of master-slave replication in MySQL. Be sure to check it out. This article is just an appetizer. Stay tuned! I’ll see you tomorrow

IT brother

A big factory to do advanced Java development program ape

Follow wechat public account: IT elder brother

Java foundation, Java Web, JavaEE all tutorials, including Spring Boot, etc

Reply: Resume template, you can get 100 beautiful resumes

Reply: Java learning route, you can get the latest and most complete a learning roadmap

Re: Java ebooks, get 13 must-read books for top programmers