问题描述:mysql在开启group_replication后,报错ERROR 3092,This member has more executed transactions than those present in the group,如下所示:
数据库:MySQL 8.0.27
系统:rhel 7.3
1、异常重现
Slave01[(none)]> start group_replication;
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.
告警日志:
2023-08-13T07:49:14.174588Z 38 [System] [MY-013587] [Repl] Plugin group_replication reported: 'Plugin 'group_replication' is starting.'
2023-08-13T07:49:14.176201Z 39 [System] [MY-011565] [Repl] Plugin group_replication reported: 'Setting super_read_only=ON.'
2023-08-13T07:49:14.179622Z 41 [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=''.
2023-08-13T07:49:22.544316Z 0 [ERROR] [MY-011526] [Repl] Plugin group_replication reported: 'This member has more executed transactions than those present in the group. Local transactions: 9e1ab21c-3986-11ee-ad9a-0050562d243d:1 > Group transactions: bbbbbbbb-bbbb-cccc-dddd-eeeeeeeeeeee:1-3'
2023-08-13T07:49:22.544390Z 0 [ERROR] [MY-011522] [Repl] Plugin group_replication reported: 'The member contains transactions not present in the group. The member will now exit the group.'
2023-08-13T07:49:22.544431Z 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to MySQL-827MGR-Master:3306, MySQL-827MGR-Slave01:3306 on view 16919056084451773:6.'
2023-08-13T07:49:25.624647Z 0 [System] [MY-011504] [Repl] Plugin group_replication reported: 'Group membership changed: This member has left the group.'
2023-08-13T07:49:25.626312Z 39 [System] [MY-011566] [Repl] Plugin group_replication reported: 'Setting super_read_only=OFF.'
2、异常原因
该节点在有操作之前创建了用户.
3、解决方案
因为是初始化安装,可采用reset master清空executed_gtid_set方式解决.
Slave01[(none)]> reset master;
Query OK, 0 rows affected (0.02 sec)
Slave01[(none)]> start group_replication;
Query OK, 0 rows affected (4.78 sec)
Slave01[(none)]> select * from performance_schema.replication_group_members;
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | MEMBER_COMMUNICATION_STACK |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
| group_replication_applier | 9259a41b-3985-11ee-a5e4-000c299ea627 | MySQL-827MGR-Master | 3306 | ONLINE | PRIMARY | 8.0.27 | XCom |
| group_replication_applier | 9e1ab21c-3986-11ee-ad9a-0050562d243d | MySQL-827MGR-Slave01 | 3306 | ONLINE | SECONDARY | 8.0.27 | XCom |
+---------------------------+--------------------------------------+----------------------+-------------+--------------+-------------+----------------+----------------------------+
2 rows in set (0.00 sec)
说明:如上所示,从节点slave01成功开启mgr.
标签:executed,group,Plugin,08,member,replication,报错,13T07,master
From: https://blog.51cto.com/u_12991611/7068041