標籤:port 支援 ons syn pos enforce 重啟 資料庫 binlog
1.修改參數master:gtid_mode = ON --開啟gtid這個必須開啟enforce-gtid-consistency = ON --開啟gtid這個必須開啟slave_parallel_workers=4 --開啟基於庫的多線程複製預設0不開啟 5.6隻能支援一個資料庫開啟一個線程,5.7可以一個資料庫開啟多個線程binlog_cache_size = 8M max_binlog_size = 50M max_binlog_cache_size = 100M sync_binlog = 1 expire_logs_days = 1 log-slave-updates=true --開啟gtid這個必須開啟 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 master_verify_checksum = 1 --主事件校正slave_sql_verify_checksum = 1 --從事件校正slave_allow_batching = 1log-slave-updates=true 2.重啟資料庫mysqladmin -uroot -hloalhost -p shutdown/usr/local/mysql/bin/mysqld_safe& 3.在slave端changechange master to master_host=‘192.168.10.100‘,master_port=3306,master_user=‘repl‘,master_password=‘123456‘,master_auto_position=1;4.查看show slave status \G Retrieved_Gtid_Set: 43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:4 Executed_Gtid_Set: 43ea2a1b-5fcc-11e8-8e35-000c29d02a8e:1-4
MySql開啟GTID和多線程複製功能