Mysql replication principle and Function Analysis (), mysql2014-11-11

Source: Internet
Author: User

Mysql replication principle and Function Analysis (), mysql2014-11-11

Replication Principle 1. The master writes data to the binlog. 2. slave enables two threads: I/O thread and SQL thread. 3. The slave I/O thread connects to the master and reads the binlog file name and position of the binlog on the master. 4. slave receives master change information through I/O thread and writes it to relay log. 5. read Relay log information through SQL thread and replay it to slave.
What does replication solve? I personally think that the main role of replication is: 1. Backup function, the slave database is a backup of the master database. 2. read/write splitting. The master database is mainly responsible for write operations and read operations from the slave database. 3. Load Balancing with multiple slave databases that can be read. 4. Master/Slave is the foundation of the high-availability architecture.

Related Article

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.