mysql MGR高可用配置

MGR 部署

1.先创建一个用户

create user 'repl'@'10.0.1.%' identified by 'replforslave';

再进行授权

grant REPLICATION SLAVE on *.* to 'repl'@'10.0.1.%' ;

2.安装插件

INSTALL PLUGIN group_replication SONAME '[group_replication.so](http://group_replication.so/)';
show plugins;
select * from INFORMATION_SCHEMA.PLUGINS where PLUGIN_NAME like '%group_replication%';

3.配置master实例

1)查看当前的group replication相关参数是否配置有误

show global variables like 'group%';

2)启动 group_replication_bootstrap_group

SET GLOBAL group_replication_bootstrap_group=ON;

3)配置MGR

CHANGE MASTER TO MASTER_USER='repl', MASTER_PASSWORD='replforslave' FOR CHANNEL 'group_replication_recovery';

4)启动MGR

start group_replication;

5)关闭 group_replication_bootstrap_group

SET GLOBAL group_replication_bootstrap_group=OFF;

posted @ 2020-01-12 18:16  Carry00  阅读(249)  评论(0编辑  收藏  举报