MySQL Master-slave Replication Introduction

Source: Internet
Author: User

MySQL Database supports the replication of one-way, two-way, chained cascade, ring-like, and different business scenarios. During the replication process, one server acts as the primary server, receives content updates from the user, and one or more other servers act as slave servers, receive log content from the primary server binlog files, parse out SQL, and re-update to the slave server, making the master-slave server data consistent.

650) this.width=650; "title=" drawing. jpg "alt=" wkiol1haql3tmcvmaabe0vd7iui996.jpg "src=" http://s1.51cto.com/wyfs02/ M02/8b/d4/wkiol1haql3tmcvmaabe0vd7iui996.jpg "/>

Figure 1-1 One master one from the logical diagram

650) this.width=650; "title=" drawing. jpg "alt=" wkiom1haqs-ru4rdaab7elylkbo532.jpg "src=" http://s2.51cto.com/wyfs02/M01/ 8b/d8/wkiom1haqs-ru4rdaab7elylkbo532.jpg "/>

Figure 1-2 a master-slave multi-Logical diagram

The one-way master-slave replication schema can only write data on the master side, and the slave server is equivalent to data backup.

650) this.width=650; "Title=" Drawing 3.jpg "alt=" wkiom1haraxqcuz7aaa-hvuavks750.jpg "src=" http://s3.51cto.com/wyfs02/M02 /8b/d8/wkiom1haraxqcuz7aaa-hvuavks750.jpg "/>

Figure 1-3 Bidirectional primary master replication logic diagram

Two-way primary master replication logical schema, which can write data on the Master1 or Master2 side, or write data simultaneously on both ends.

650) this.width=650; "Title=" Drawing 3.jpg "alt=" wkiom1hareoqukwgaabdpeettnk239.jpg "src=" http://s4.51cto.com/wyfs02/M00 /8b/d8/wkiom1hareoqukwgaabdpeettnk239.jpg "/>

Figure 1-4 Linear Cascade unidirectional dual master replication logic diagram

Linear cascade unidirectional Dual Master replication logical schema, this schema can only be written on the Master1 side of the data, in the work scenario, Master1 and Master2 as the primary master, Slave1 as the slave, the middle Master2 need special settings.

MySQL master-slave Replication Principle Introduction

MySQL master-slave replication is an asynchronous replication process, the data will be copied from one MySQL database to another MySQL database, between master and slave to achieve the entire master-slave replication process is done by three threads involved. There are two lines on the slave side, and the other thread is on the master side.

This article is from the "sky9890" blog, make sure to keep this source http://sky9896.blog.51cto.com/2330653/1884814

MySQL Master-slave Replication Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.