MGR

单主模式 

参数修改

server_id=1

gtid_mode=ON

enforce_gtid_consistency=ON

binlog_checksum=NONE

log_bin=binlog

log_slave_updates=ON

binlog_format=ROW

master_info_repository=TABLE

relay_log_info_repository=TABLE

 

transaction_write_set_extraction    =XXHASH64
loose-group_replication_group_name='5f6268dc-b17f-11e8-abfa-c03fd530ffff'
loose-group_replication_start_on _boot=off
loose-group_replication_group_seeds="150.0.32.236:24901,150.0.32.236:24902,150.0.32.236:24903"
loose-group_replication_ip_whitelist='150.0.32.236'
loose-group_replication_local_address='150.0.32.236:24902'
loose-group_replication_bootstrap_group=off

 

配置主节点

set sql_log_bin=0;
create user 'repl'@'%' identified by 'repl';
grant replication slave on *.* to 'repl'@'%';
flush privileges;
set sql_log_bin=1;
 
change master to master_user='repl',master_password='repl' for channel 'group_replication_recovery';
INSTALL PLUGIN group_replication SONAME 'group_replication.so';
SET GLOBAL group_replication_bootstrap_group=ON;
START GROUP_REPLICATION;
SET GLOBAL group_replication_bootstrap_group=OFF;
 
select * from performance_schema.replication_group_members;

 

配置备节点

set sql_log_bin=0;
create user 'repl'@'%' identified by 'repl';
grant replication slave on *.* to 'repl'@'%';
flush privileges;
set sql_log_bin=1;
 
change master to master_user='repl',master_password='repl' for channel 'group_replication_recovery';
INSTALL PLUGIN group_replication SONAME 'group_replication.so';
START GROUP_REPLICATION;
 

多主模式

loose-group_replication_single_primary_mode=off
loose-group_replication_enforce_update_everywhere_checks=on
 

相关视图监控

performance_schema.replication_group_member_stats

performance_schema.replication_group_members

performance_schema.replication_connection_status

performance_schema.replication_applier_status

 

 

其他

流控
开启 group_replication_flow_control_mode=quota
group_replication_flow_control_applier_threshold=25000 (默认事务个数)
group_replication_flow_control_certifier_threshold=25000(默认事务个数)
 
关闭 group_replication_flow_control_mode='disabled'
备份和加节点时  关闭流控,防止事务延迟过多。

 

 

转载于:https://www.cnblogs.com/emmm233/p/9640704.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值