mysql-Semi-synchronous

Source: Internet
Author: User

Semi-synchronous


1. Main service

mysql > Install plugin rpl_semi_sync_master soname ' semisync_master.so '; # Turn on the main service semi-sync function

MySQL > Show global variables like '%semi% '; #查看半同步开启状态信息

MySQL > Set global rpl_semi_sync_master_enabled=on; Turn on semi-synchronous replication

MySQL > Set global rpl_semi_sync_master_timeout=10000; Set to 10 seconds 10000ms milliseconds =10 seconds 1000ms milliseconds = 1 seconds

or add in [mysqld]

rpl_semi_sync_master_enabled = 1

Rpl_semi_sync_master_timeout = 10000

2. From the service

mysql > Install plugin rpl_semi_sync_slave soname ' semisync_slave.so '; # turn on slave half sync function

To set the replication of global variables from the server semi-synchronous

MySQL > Set global rpl_semi_sync_slave_enabled=on; Turn on semi-synchronous replication

or add in [mysqld]

rpl_semi_sync_slave_enabled = 1

mysql > Stop slave io_thread; Close IO Thread

mysql > Start slave io_thread; Open IO Thread

3. View primary, slave server status

MySQL > Show global status Like '%semi% ';

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/71/B0/wKioL1XW6j3QlektAAIxF9c_VA4493.jpg "title=" 1.png " alt= "Wkiol1xw6j3qlektaaixf9c_va4493.jpg"/>


(Note: The red position of the first display by the number of clients 1, the second display on it became)

4. View global Variables

MySQL > Show global variables like '%semi% ';

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/B4/wKiom1XW6KKBFarYAAFLjtB9iuA004.jpg "title=" 2.png " alt= "Wkiom1xw6kkbfaryaafljtb9iua004.jpg"/>


View Binlong Logs

SHOW BINLOG EVENTS in ' mysql-bin.000002 ';

There will be information you want.


This is the end!


This article from "SQL" blog, declined reprint!

mysql-Semi-synchronous

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.