Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
requirements:
- list of nodes
- username / password
On each node do:
<> show variables like 'server_uuid';
Get the UUID of the host you are looking at, which matches the MEMBER_ID value
<> SELECT * FROM performance_schema.replication_group_members\G;
Example (1 row per node, unless self node is offline, then only 1 result for self stating OFFLINE)
CHANNEL_NAME: group_replication_applier
MEMBER_ID: 00ce5e96-96ea-11e7-9fcd-0201ac10006f
MEMBER_HOST: 172.16.0.111
MEMBER_PORT: 13306
MEMBER_STATE: ONLINE
When the MEMBER_STATE == ONLINE, the node is healthy
Offline takes precedance on any node output. Suggestion would be
default -> UNKNOWN
any query saying ONLINE -> from UNKNOWN to HEALTHY (or keep HEALTHY)
any query saying OFFLINE -> set and keep OFFLINE
(so if node 1 says 3x online, but node 2 says there is 1 offline, then that node is offline)
<> SELECT @@global.read_only\G;
Output:
- 0 -> Master
- 1 -> Slave
Only 1 should be master. You can confirm this by running on all nodes
SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME= 'group_replication_primary_member';
then check if the UUID returned by all the nodes is the same. Then match the UUID to the MEMBER_ID from the first query
and promote that server to master. So both read_only flags and this query should match before promoting to master.