在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;
來驗證所有節點是否已經加入組,并且狀態是否正常。