1.关闭通道的数据同步
select * from replication_group_members;
stop slave sql_thread for channel 'group_replication——applier';
start slave sql_thread for channel 'group_replication——applier';
select * from replication_connection_status\G;
2.停止插件通过下面的命令停用Group Replication插件,这个命令将MySQL服务器从一个Group Replication组内移除出去。
stop group_replication;
select * from replication_connection_status\G;
3.group_replication的数据加用户
检查_gr_user@localhost用户是否存在
必须要用root用户创建_gr_user@localhost
4.组初始化的步骤
MySQL的相关配置略过不提,Group Replication组的初始化步骤如下:
install plugin group_replication SONAME="group_replication.so";
set global group_replication_group_name="1234568-1234-1234-1234567890ab";
set group_replication_local_address="127.0.0.1:20001";
set global group_replication_bootstrap_group=ON;
start group_replication;
set global group_replication_bootstrap_group=OFF;
5.新成员加入
change master to master_user='rpl_uesr',master_password='rpl_pass' for channel 'group_replication_recovery';
6.成员加入组的步骤
install plugin group_replication SONAME="group_replication.so";
set global group_replication_group_name="1234568-1234-1234-1234567890ab";
set group_replication_local_address="127.0.0.1:20001";
set group_replication_group_seeds="127.0.0.1:20001";
change master to master_user='rpl_uesr',master_password='rpl_pass' for channel 'group_replication_recovery';
start group_replication;