MySQL 5.6 gtid Copy

Source: Internet
Author: User
Tags change settings dedicated server

Grant Replication Slave on * * to [e-mail protected] ' IP ' identified by ' xxx ';

Flush privileges;


Change Master to master_host= ' 192.168.1.103 ', master_port=3306,master_user= ' repl ', master_password= ' ffffff ', master_ Auto_position=1;

Start slave;

Show Slave Status\g


MY.CNF file

# for advice The change settings

# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[Client]

Port = 3306

Socket =/tmp/mysqld1.sock


[Mysqld]


# Remove Leading # and set to the amount of RAM for the most important data

# Cache in MySQL. Start at 70% of all RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M


# Remove Leading # to turn on a very important data integrity option:logging

# Changes to the binary log between backups.

# Log_bin


# These is commonly set, remove the # and set as required.

Basedir =/USR/LOCAL/MYSQL1

DataDir =/DATA/MYSQL1

Port = 3306

Socket =/tmp/mysqld1.sock


Server-id = 1


#binlog

Log-bin =/data/mysql1/logs/mysql1-bin

Binlog_format = row

Binlog-row-image = Minimal

Binlog_cache_size = 512K

Max_binlog_size = 100M

Gtid-mode=on

Enforce-gtid-consistency=true

Log-slave-updates=true

Slave_parallel_workers = 2


Sync_binlog = 1


#relay Log

Relay-log =/data/mysql1/logs/relay1-log

Max_relay_log_size = 100M


#check Binlog

Binlog_checksum = CRC32

slave_allow_batching = 1

Master_verify_checksum = 1

Slave_sql_verify_checksum = 1


Binlog_rows_query_log_events = 1

Master-info-repository=table

Relay-log-info-repository=table

Sync-master-info=1


Binlog-ignore-db=mysql

Binlog-ignore-db=information_schema

Binlog-ignore-db=performance_schema

Replicate-ignore-db=mysql

Replicate-ignore-db=information_schema

Replicate-ignore-db=performance_schema

auto-increment-increment=10

Auto-increment-offset=1



# Remove Leading # To set options mainly useful for reporting servers.

# The server defaults is faster for transactions and fast selects.

# Adjust sizes as needed, experiment to find the optimal values.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M


MySQL 5.6 gtid Copy

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.