Answer the question
In order to leave comments, you need to log in
What is the best way to set up Master-Slave GTID replication in MySQL?
Setting up gtid replication in MySQL. Both on the master and on the mysql 5.7
slave There is very little information on the network on gtid replication and it is all of the same type, the mysql docks also do not answer the question "how to configure optimal replication using gtid".
The problem is that the folder with binlogs grows very quickly (VERY FAST!) and the slave does not have time to synchronize, the lag only increases. What am I doing wrong? Maybe some tables should be ignored?
I take a backup from the master to the slave using Percona Xtrabackup.
Master my.cnf
[mysqld]
server-id = 1
binlog-format = row
gtid_mode=ON
enforce-gtid-consistency=ON
log-slave-updates
log_bin = /var/log/mysql/mysql-bin.log
performance_schema_max_digest_length = 8192
max_digest_length = 8192
max_binlog_size= 500M
expire_logs_days = 4
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
key_buffer_size = 16M
innodb_flush_method = O_DIRECT
max_connections = 200
innodb_temp_data_file_path=ibtmp1:12M:autoextend:max:5G
server-id = 2
binlog-format = row
gtid_mode=ON
enforce-gtid-consistency=ON
relay-log = /var/log/mysql/mysql-relay-bin.log
log_bin = /var/log/mysql/mysql-bin.log
skip_slave_start
log_slave_updates = 1
read_only = ON
innodb_file_per_table = ON
innodb_buffer_pool_size = 3G
max_binlog_size = 500M
max_relay_log_size = 500M
relay_log_space_limit = 5G
relay_log_recovery = ON
expire_logs_days = 4
slave-parallel-workers = 0
innodb_temp_data_file_path=ibtmp1:12M:autoextend:max:5G
replicate-ignore-db=information_schema
replicate-ignore-db=mysql
replicate-ignore-db=performance_schema
binlog-ignore-db = information_schema
binlog-ignore-db = mysql
binlog-ignore-db = performance_schema
Answer the question
In order to leave comments, you need to log in
the slave does not have time to synchronize, the lag only increases.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question