mysql组复制无法添加示例

kx1ctssn  于 2023-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(297)

22.22.22.22上的配置文件:

...

loose-group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address= "127.0.0.1:33061"
loose-group_replication_group_seeds= "127.0.0.1:33061,33.33.33.33:33061"
loose-group_replication_bootstrap_group=off

我像医生说的那样做了:

SET SQL_LOG_BIN=0;
CREATE USER rpl_user@'%' IDENTIFIED BY 'password';
GRANT REPLICATION SLAVE ON *.* TO rpl_user@'%';
FLUSH PRIVILEGES
SET SQL_LOG_BIN=1
CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' 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;

目前一切正常。。。
我在33.33.33.33上有一个配置文件:

...

loose-group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
loose-group_replication_start_on_boot=off
loose-group_replication_local_address= "127.0.0.1:33061"
loose-group_replication_group_seeds= "22.22.22.22:33061,127.0.0.1:33061"
loose-group_replication_bootstrap_group=off

此外,我还遵循以下文件:

SET SQL_LOG_BIN=0;
CREATE USER rpl_user@'%' IDENTIFIED BY 'password';
GRANT REPLICATION SLAVE ON *.* TO rpl_user@'%';
SET SQL_LOG_BIN=1;
CHANGE MASTER TO MASTER_USER='rpl_user', MASTER_PASSWORD='password' FOR CHANNEL 'group_replication_recovery';

INSTALL PLUGIN group_replication SONAME 'group_replication.so';

一切还可以。。
但当我进去的时候

START GROUP_REPLICATION;

33.33.33.33发生错误:
错误3092(hy000):服务器未正确配置为组的活动成员。请查看错误日志的详细信息。
错误日志:

2018-08-31T13:50:20.850316Z 14 [Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] Automatically adding IPv4 localhost address to the whitelist. It is mandatory that it is added.'
2018-08-31T13:50:20.850719Z 16 [System] [MY-010597] [Repl] 'CHANGE MASTER TO FOR CHANNEL 'group_replication_applier' executed'. Previous state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''. New state master_host='<NULL>', master_port= 0, master_log_file='', master_log_pos= 4, master_bind=''.
2018-08-31T13:50:21.041909Z 0 [Warning] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] read failed'
2018-08-31T13:50:21.056819Z 0 [ERROR] [MY-011735] [Repl] Plugin group_replication reported: '[GCS] The member was unable to join the group. Local port: 33061'

怎么办?
mysql版本:8.0.12

yhxst69z

yhxst69z1#

您正在将通信地址标到本地主机地址:
松散组\u复制\u本地\u地址=“127.0.0.1:33061”
松散组\u复制\u本地\u地址=“127.0.0.1:33061”
但是你要用公共地址联系会员。如果要公开联系成员,则需要绑定到公共地址。

相关问题