下午按照Gitee上的GreatSQL-Doc/deep-dive-mgr /deep-dive-mgr-03.md文件手动构建了一个MGR集群,三节点,其中主节点一直正常起来online,但两个次节点一直处于recovering状态,然后自动重试一段时间后最终被移除出集群,日志报错信息是次节点通过repl账户连不上主节点,报错如下: Aug 6 16:14:34 mgr02 mysqld: 2023-08-06T08:14:34.665660Z 82 [ERROR] [MY-010584] [Repl] Slave I/O for channel 'group_replication_recovery': error connecting to master 'repl@192.168.1.21:3306' - retry-time: 60 retries: 1 message: Host '192.168.1.22' is not allowed to connect to this MySQL server, Error_code: MY-001130 Aug 6 16:14:34 mgr02 mysqld: 2023-08-06T08:14:34.672550Z 54 [ERROR] [MY-011582] [Repl] Plugin group_replication reported: 'There was an error when connecting to the donor server. Please check that group_replication_recovery channel credentials and all MEMBER_HOST column values of performance_schema.replication_group_members table are correct and DNS resolvable.' Aug 6 16:14:34 mgr02 mysqld: 2023-08-06T08:14:34.672656Z 54 [ERROR] [MY-011583] [Repl] Plugin group_replication reported: 'For details please check performance_schema.replication_connection_status table and error log messages of Slave I/O for channel group_replication_recovery.' 然后人工试了下创建的repl账户去次节点连接主节点,果然不行,提示需要改为mysql_native_password插件才行(突然想起这是8.0版本,尴尬),于是乎急忙改了,结果提示还是有问题,说密码不对,如下: Aug 6 16:56:38 mgr02 mysqld: 2023-08-06T08:56:38.122974Z 144 [ERROR] [MY-010584] [Repl] Slave I/O for channel 'group_replication_recovery': error connecting to master 'repl@192.168.1.21:3306' - retry-time: 60 retries: 1 message: Access denied for user 'repl'@'192.168.1.22' (using password: YES), Error_code: MY-001045 结果又手工试了下去次节点连接主节点,果真不行,一下子懵了,于是好好研究了一下修改的语句,语句如下: set session sql_log_bin=0; set global super_read_only=off; alter user repl identified with mysql_native_password; set session sql_log_bin=1; 然后特地百度了一下alter语法,果然又是我搞错了(欲速则不达,问题alter这么写,MySQL也给通过 ![]() ps:过程当中我其实通过以下办法仍无法解决,仍然报密码不对,后面新建账户用了新账户去连。 set session sql_log_bin=0; set global super_read_only=off; update mysql.user set plugin ="mysql_native_password" where user = 'repl' and host = '%'; flush privileges; set session sql_log_bin=1; set session sql_log_bin=0; update mysql.user set host = '192.168.1.%' where user = 'repl' and host = '%'; flush privileges; set session sql_log_bin=1; 下午有点晕,心想可能通过update修改可能真的不行吧,show grants for的时候都提示没这个授权信息,于是就干脆新建账户去搞了 |
yejr
2023-8-6 21:37:35
| ||
greatSQL_user01
2023-8-6 21:59:51
| ||
greatSQL_user01
2023-8-6 23:46:36
| ||
fander
2023-8-7 01:10:17
| ||
yejr
2023-8-7 08:28:47
| ||
greatSQL_user01
2023-8-7 11:06:38
| ||
greatSQL_user01
2023-8-7 11:08:08
| ||
yejr
2023-8-7 12:18:53
| ||
greatSQL_user01
2023-8-7 13:25:26
| ||
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com