MySQL搭建高可靠主从复制

开启binlog

log_bin=/data/binlog/mysql/bin
binlog_format = row

开启GTID

gtid-mode=on
enforce-gtid-consistency=true

开启半同步复制(为了方便做高可用主从都配置)

#加载插件
INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
#查看是否加载成功:
show plugins;

#启动:
SET GLOBAL rpl_semi_sync_master_enabled = 1;
SET GLOBAL rpl_semi_sync_slave_enabled = 1;

#重启从库上的IO线程
STOP SLAVE IO_THREAD;
START SLAVE IO_THREAD;

#查看是否在运行
show status like '%rpl%';
上一篇:semi-supervised


下一篇:[半监督学习] Temporal Ensembling for Semi-Supervised Learning