博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
myql 5.7.21 GTID 组复制
阅读量:6611 次
发布时间:2019-06-24

本文共 4966 字,大约阅读时间需要 16 分钟。

hostname IP 角色
node13 1.1.1.13 master1
node14 1.1.1.14 master2
node15 1.1.1.15 master3
[mysql]prompt=\\u@\\h:\\d \\R:\\m:\\s>user=rootpassword=nihao123,[mysqld]datadir = /var/lib/mysqlsocket = /var/lib/mysql/mysql.socksql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLESserver_id = 01gtid_mode = ONenforce_gtid_consistency = ONmaster_info_repository = TABLErelay_log_info_repository = TABLEbinlog_checksum = NONElog_slave_updates = ONlog_bin = binlogbinlog_format = ROWtransaction_write_set_extraction = XXHASH64loose-group_replication_group_name = 'ce9be252-2b71-11e6-b8f4-00212844f856'loose-group_replication_start_on_boot = offloose-group_replication_local_address = '1.1.1.13:33061'loose-group_replication_group_seeds = '1.1.1.13:33061,1.1.1.14:33061,1.1.1.15:33061'loose-group_replication_bootstrap_group = offloose-group_replication_single_primary_mode=FALSEloose-group_replication_enforce_update_everywhere_checks= TRUEslave_preserve_commit_order=onslave_parallel_type=LOGICAL_CLOCKsymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidvalidate_password_length = 1validate_password_policy = 0validate_password_mixed_case_count = 2group_replication_ip_whitelist = '127.0.0.1/32,1.1.1.0/24,2.2.2.0/24'
[mysql]prompt=\\u@\\h:\\d \\R:\\m:\\s>user=rootpassword=nihao123,[mysqld]datadir = /var/lib/mysqlsocket = /var/lib/mysql/mysql.socksql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLESserver_id = 02gtid_mode = ONenforce_gtid_consistency = ONmaster_info_repository = TABLErelay_log_info_repository = TABLEbinlog_checksum = NONElog_slave_updates = ONlog_bin = binlogbinlog_format = ROWtransaction_write_set_extraction = XXHASH64loose-group_replication_group_name = 'ce9be252-2b71-11e6-b8f4-00212844f856'loose-group_replication_start_on_boot = offloose-group_replication_local_address = '1.1.1.14:33061'loose-group_replication_group_seeds = '1.1.1.13:33061,1.1.1.14:33061,1.1.1.15:33061'loose-group_replication_bootstrap_group = offloose-group_replication_enforce_update_everywhere_checks= TRUEloose-group_replication_single_primary_mode=FALSEsymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidvalidate_password_length = 1validate_password_policy = 0validate_password_mixed_case_count = 2group_replication_ip_whitelist = '127.0.0.1/32,1.1.1.0/24,2.2.2.0/24'
[mysql]prompt=\\u@\\h:\\d \\R:\\m:\\s>user=rootpassword=nihao123,[mysqld]datadir = /var/lib/mysqlsocket = /var/lib/mysql/mysql.socksql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLESserver_id = 03gtid_mode = ONenforce_gtid_consistency = ONmaster_info_repository = TABLErelay_log_info_repository = TABLEbinlog_checksum = NONElog_slave_updates = ONlog_bin = binlogbinlog_format = ROWtransaction_write_set_extraction = XXHASH64loose-group_replication_group_name = 'ce9be252-2b71-11e6-b8f4-00212844f856'loose-group_replication_start_on_boot = offloose-group_replication_local_address = '1.1.1.15:33061'loose-group_replication_group_seeds = '1.1.1.13:33061,1.1.1.14:33061,1.1.1.15:33061'loose-group_replication_bootstrap_group = offloose-group_replication_enforce_update_everywhere_checks= TRUEloose-group_replication_single_primary_mode=FALSEsymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidvalidate_password_length = 1validate_password_policy = 0validate_password_mixed_case_count = 2group_replication_ip_whitelist = '127.0.0.1/32,1.1.1.0/24,2.2.2.0/24'super_read_only = 1

node13 配置如下:

set sql_log_bin=0;
create user rpl_user@’%’;
grant replication slave on . to rpl_user@’%’ identified by ‘rpl_pass’;
flush privileges;
set sql_log_bin=1;
change master to master_user=’rpl_user’,master_password=’rpl_pass’ 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;

node14 配置如下:

set sql_log_bin=0;
set global group_replication_bootstrap_group=on;
grant replication slave on . to rpl_user@'%' identified by 'rpl_pass';
set sql_log_bin=1;
change master to master_user='rpl_user',master_password='rpl_pass' for channel 'group_replication_recovery';
install plugin group_replication SONAME 'group_replication.so';
set global group_replication_allow_local_disjoint_gtids_join=ON;
set global group_replication_single_primary_mode=off;
start group_replication;

node15 配置如下:

set sql_log_bin=0;
set global group_replication_bootstrap_group=on;
grant replication slave on . to rpl_user@'%' identified by 'rpl_pass';
set sql_log_bin=1;
change master to master_user='rpl_user',master_password='rpl_pass' for channel 'group_replication_recovery';
install plugin group_replication SONAME 'group_replication.so';
set global group_replication_allow_local_disjoint_gtids_join=ON;
set global group_replication_single_primary_mode=off;
start group_replication;

参考:

转载于:https://blog.51cto.com/onlywyn/2093722

你可能感兴趣的文章
“多才多艺”的安卓***Rotexy已在3个月里发动7万多次***
查看>>
学习三十九
查看>>
【许晓笛】EOS 超级节点的五个使命
查看>>
Linux 的 rsync 远程同步工具
查看>>
2018-7-3
查看>>
centos7安装小结
查看>>
更换UPS蓄电池
查看>>
Bootstrap的一些笔记——modal
查看>>
Python二十九个常见的脚本汇总!
查看>>
AJPFX简述abstract class和interface的区别
查看>>
利用剪切板JS API优化输入框的粘贴体验
查看>>
黑马程序员——内部类
查看>>
AS3 类库资源
查看>>
OA系统
查看>>
Linux ssh无密钥登录
查看>>
校园的早晨
查看>>
[学习]拆分成二维数组
查看>>
用shell脚本实现增加,删除用户,查询更改UID和GID以及统计用户数
查看>>
数组的工具类Arrays
查看>>
h5+ hbuilder ios提示语修改
查看>>