在MySQL Group Replication搭建的步骤如下:
server_id=1
gtid_mode=ON
enforce_gtid_consistency=ON
plugin_load_add = group_replication.so
group_replication_group_name='aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa'
group_replication_start_on_boot=ON
SET GLOBAL group_replication_bootstrap_group=ON;
START GROUP_REPLICATION;
SET GLOBAL group_replication_bootstrap_group=OFF;
START GROUP_REPLICATION;
SELECT * FROM performance_schema.replication_group_members;
来验证所有节点是否已经加入组,并且状态是否正常。