Cluster Membership

Hi Percona XtraDB Cluster Community!

How can I verify cluster membership and who is the primary?? I have tried the sql from the following blog, but for my 2 node cluster I get “Empty set” returned??

I know this blog is more related to setting the weighting for the primary but I would have thought that the sql to show the cluster members should work:

mysql> select member_host,member_state,member_role,member_version from performance_schema.replication_group_members;
Empty set (0.00 sec)

Thanks in advance



Hi @mikejohnhathaway thanks for posting to the Percona forums!

You’ve posted to the Percona XtraDB Cluster forum… but your query and link relate to Group Replication. Which technology are you in fact looking for assistance on?

1 Like

Hi @Michael_Coburn,

Thanks for the reply, this may be why the query isnt helping, this is for a Percona XtraDB cluster, I am trying to work out which node thinks is the primary, the following query on either of the two nodes indicates Primary on node 1 and 2??

show status like 'wsrep%';



1 Like

Hi @mikejohnhathaway thanks for clarifying :slight_smile: Yes that query is not going to work to get you information for PXC.

The simplest way to see the health of a node is to use PMM and you’ll see on the PXC/Galera Node Summary dashboard a Local State and Cluster Status box at the top which will give you membership and primary/non-primary status of the member.

If you want to do it from the command line:
Local State
You want to confirm your node is a member of the cluster and is up to date, this is reflected in the wsrep_local_state_comment by the value Synced
Cluster Status
Whether the member is part of the PRIMARY or NON_PRIMARY component is reflected in the value of wsrep_cluster_status

1 Like