Configuration and maintenance of MySQL 5.6 Gtid

Source: Internet
Author: User


# Gtid Related configuration:
enforce_gtid_consistency = true # force Gtid performed check must be on (static parameter) disable-gtid-unsafe-statementsHttp://imysql.cn/2012/09/21/mysql-faq-can-not-login-after-new-install.html
Gtid_mode = on # turn on Gtid copy (static parameter)
log_slave_updates = true # writes the statement to the binary log
binlog_format = row # row mode replication, recommended line mode (dynamic parameter)
binlog_row_image = minimal # row copy mode, minimum copy mode (dynamic parameter)

# Turn on copy mode
stop slave;
Change master to master_host= ' 192.168.1.95 ', master_user= ' repl ', master_password= '[email protected]', master_auto_position=1;
start slave;

# Handling of error problems in Gtid mode
Way One:
stop slave;
reset Master; # causes the gtid_executed variable to become empty
set global gtid_purged= ' 29f5e5d6-0e58-11e5-ab0f-00163e634e89:1-22108 '; #这个gtid is the Gtid to perform an error from the library
start slave;
Way Two: (The official recommended way)
stop slave;
SET SESSION gtid_next = ' 9ba6eccd-0e56-11e5-ab05-00163e027dd7:1 ';
BEGIN; COMMIT;
SET SESSION gtid_next = AUTOMATIC;
START SLAVE;

# Gtid Restrictions: # # Gtid Related bugs
1.create Table TT select * from t1; #
2. Temporary tables cannot be created inside a transaction create temporary table TT (ID int, iname varchar )

Reference Documentation:
http://dwchaoyue.blog.51cto.com/2826417/1559764

This article is from the "SQL Server MySQL" blog, so be sure to keep this source http://dwchaoyue.blog.51cto.com/2826417/1840525

Configuration and maintenance of MySQL 5.6 Gtid

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.