一、前言
? ? mysql mgr集群所有節點都斷電重啟時,就會面臨一個問題,應該怎么重新構建mgr集群
二、操作
? ?查詢所有節點的master狀態
show master status;
? ?查看同步狀態,可以通過uuid知道是通過哪個節點進行同步的數據
? ?查看所有節點的uuid,找到與同步數據相同的uuid設置為主節? ?
show variables like 'server_uuid';
??
? 找到與同步數據的uuid相同的節點后,以該節點為集群首節點建立mgr集群
SET GLOBAL group_replication_bootstrap_group=ON;
START GROUP_REPLICATION;
SET GLOBAL group_replication_bootstrap_group=OFF;
其余的節點只要執行加入集群命令即可
START GROUP_REPLICATION;
如果mgr集群重啟直接在任意節點執行啟動mgr集群命令會報錯?
ERROR 3092 (HY000): The server is not configured properly to be an active member of the group. Please see more details on error log.