gpt4 book ai didi

Mysql组复制无法添加实例

转载 作者:行者123 更新时间:2023-11-29 17:04:25 26 4
gpt4 key购买 nike

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

最佳答案

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

loose-group_replication_local_address= "127.0.0.1:33061"

loose-group_replication_local_address= "127.0.0.1:33061"

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

关于Mysql组复制无法添加实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52117449/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com