3

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

4

1 回答 1

1

您正在将通信地址竞价到本地主机地址:

松散组复制本地地址=“127.0.0.1:33061”

松散组复制本地地址=“127.0.0.1:33061”

但是您随后尝试使用公共地址联系成员。如果要公开联系该成员,则需要绑定到公共地址。

于 2018-12-20T18:53:09.830 回答