MySQL Master-slave configuration

Source: Internet
Author: User
MySQL Master-slave configuration

  • MySQL Master-Slave introduction
  • Preparatory work
  • Configure the Primary
  • Configuration from
  • Test Master-Slave synchronization

MySQL Master-Slave introduction

MySQL master-slave is also called replication, AB replication. Simply speaking is a and b two machines from the back, write the data on a, the other B will follow the writing data, both data in real-time synchronization.
MySQL master-slave is based on Binlog, the Lord must open Binlog to carry out master and slave.
The master-slave process has a roughly 3-step

  1. The change operation is recorded in Binlog.
  2. From synchronizing the main binlog event (SQL statement) to the native and recording in Relaylog
  3. Execute sequentially from the SQL statements inside the Relaylog

The Lord has a log dump thread that is used to communicate with the I/O thread from Binglog
There are two threads from the top, where I/O threads are used to synchronize the main binlog and generate Relaylog, and another SQL thread is used to put the SQL statements inside the Relaylog

Ready to work (build MySQL on two machines)
MySQL Installation

MySQL Master-slave configuration

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.