配置MySQL半同步复制
1. 安装
-------------------------------------
On the master:
mysql> INSTALL PLUGIN rpl_semi_sync_master SONAME 'semisync_master.so';
On each slave:
mysql> INSTALL PLUGIN rpl_semi_sync_slave SONAME 'semisync_slave.so';
2. 必须同时两端激活
-------------------------------------
At runtime:
On the master:
mysql> SET GLOBAL rpl_semi_sync_master_enabled = 1;
mysql> SET GLOBAL rpl_semi_sync_master_timeout = 3000;
On the slave:
mysql> SET GLOBAL rpl_semi_sync_slave_enabled = 1;
mysql> STOP SLAVE IO_THREAD; START SLAVE IO_THREAD;
3. 监视
-------------------------------------
看配置
SHOW VARIABLES LIKE 'rpl_semi_sync%';
看状态:
SHOW STATUS LIKE 'Rpl_semi_sync%';
阅读(3307) | 评论(0) | 转发(0) |