Tag:port Support ons syn pos enforce restart database binlog
1. Modify Parameters Master:gtid_mode = on --Open Gtid Must open enforce-gtid-consistency = on --to open Gtid This has to be turned on slave_parallel_workers=4 --Open library-based multi-threaded replication default 0 does not open 5.6 can only support one database to open a thread, 5.7 can open multiple threads in one database Binlog_cache_size = 8m max_binlog_ Size = 50m max_binlog_cache_size = 100m sync_binlog = 1 expire_logs_days = 1 log-slave-updates= true --Open Gtid This must be turned on slave:binlog_format = Rowgtid_mode = onenforce-gtid-consistency = Onbinlog_cache_size = 8mmax_binlog_size = 50mmax_binlog_cache_size = 100Msync_binlog = 1expire_logs_days = 1slave_parallel_workers=4max_relay_log_size = 50mrelay_log_purge = 1relay_log_recovery = 1 & Nbsp;master_verify_checksum = 1 --Main Event Check slave_sql_verify_checksum = 1 --from event checksum slave_allow_batching = 1log-slave-updates=true 2. Restart the database mysqladmin-uroot-hloalhost-p shutdown/usr/local/mysql/bin/mysqld_safe& 3. On the slave side Changechange master to master_host= ' 192.168.10.100 ', master_port=3306,master_user= ' repl ', master_password= ' 123456 ', master_auto_position=1;4. View Show slave status \g Retrieved_Gtid_Set:43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:4 executed_gtid_set:43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:1-4
MySQL turns on gtid and multi-threaded replication