"MySQL 5.7 Replication new features" Interactive FAQ

Source: Internet
Author: User
Tags failover unsupported

original 2016-07-21 Song Li mysql Chinese web

Share Themes

"MySQL 5.7 Replication new Features"

Guest Introduction

Song Li , MySQL research engineer. 2009 joined the MySQL Global research and development team to develop MySQL replication related functions.

Topic Introduction

Mainly shared in MySQL 5.7, Replication (replication) related to some of the new features, such as multi-source replication, enhanced semi-synchronous replication, parallel replication and so on.

Agenda

    1. Gtid replication

    2. Multithreaded concurrent Replication

    3. Semi-synchronous replication

    4. Multi-source Replication

    5. Other features

This time, the PPT, recording I also put in the Baidu Cloud disk, welcome to download the dump. Baidu Cloud Disk Link: http://pan.baidu.com/s/1gfNR7NH Password: adqm .

Interactive Questions and Answers

Due to the limited space, we have chosen 10 more representative questions to answer.

Q 1: under multi-source replication, is support Master 5.6,slave 5.7?

Answer: yes.

"Old leaf supplement" is very not recommended across the large version of MySQL Replication.

Q 2: semi-synchronous replication sets n slave responses, what if the current slave is less than n?

A : It depends on the settings of the Rpl_semi_sync_master_wait_no_slave.

-Rpl_semi_sync_master_wait_no_slave = 0

Will immediately become asynchronous replication.

-Rpl_semi_sync_master_wait_no_slave = 1

Still waits for an answer until it expires.

Q 3:Gtid If an unsupported statement appears, how to resolve

Answer: Remove unsupported statements/transactions from the app:

For example:

-CREATE TABLE ... SELECT

It is possible to:

CREATE TABLE

INSERT ... SELECT

Q 4: Gtid-based replication, can you specify the starting location for Gtid replication, or can it be based on existing information?

Answer: Gtid replication is to get rid of the Binlog file name and location dependencies. Therefore, you cannot specify the starting position of the copy, nor is it necessary to specify it at all.

Q 5: a database has been opened Gtid to do a from the library, the first backup down to the new slave up, directly can be synchronized or first need to do Purge_gtid operation Resynchronization?

A : you need to set gtid_purged. The whole process can be done through mysqldump.

Please refer to the manual: Http://dev.mysql.com/doc/refman/5.7/en/replication-gtids-failover.html#replication-gtids-failover-copy

q 6: online is all 5.5 of the environment, there is no way to build 5.5 to 5.7 of the replication?

A : yes, but the Gtid function cannot be turned on.

"Old leaf supplement" is very not recommended across the large version of MySQL Replication, not to mention the collapse of 2 large versions, it is best to upgrade first.

Q 7: parallel replication Logical_clock, if you do not open Gtid can not be parallel?

A : You can also use Logical_clock parallel replication without opening gtid.

Q 8: in the master-slave replication process, is the main push from the data or pull the data, if the process of transmission, the network flash, will not cause the loss of data packets, it would perform a verification retransmission it?

Answer: The Slave IO thread initiates a connection to master.

Then master starts sending the Events,slave just passive receive.

A TCP connection is used between slave and master. TCP is a reliable connection. Network drops are automatically processed by the TCP layer.

MySQL does not need to be processed.

If slave cannot receive a full event for a long time, or an error occurred while receiving an event. Slave

will be processed accordingly.

If slave thinks, re-establishing the connection will solve the problem. The slave automatically disconnects from the original connection and then reconnect to master.

If slave believes that this error cannot be resolved automatically, slave will stop the IO thread and make an error.

Q 9: set the Binlog_group_commit_sync_delay parameter, in the downtime should not affect the Binglog file security it?

Answer: does not affect

Q: is multi-source replication only available in asynchronous mode? Because the state of the semi-synchronous is global, one channel shutdown causes other channels to fail, does it consider changing the semi-synchronous state to the private configuration of each channel?

A : there is only one channel to open Seimsync, and the other is to use asynchronous channels. Not only the Semisync, but also the state of the asynchronous channel should be changed to the private configuration of each channel, are considered.

"MySQL 5.7 Replication new features" Interactive FAQ

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.