MySQL Group Replication: who is the primary master – updated!


Some time ago I wrote this article explaining how to find which node was the Primary Master in a MySQL Group Replication cluster running in Single-Primary Mode.

In the latest release of Group Replication, MySQL 8.0.2 dmr, Jaideep improved the visibility of Group Replication extending the performance_schema tables (see his article).

Thanks to these improvements, it’s now very easy to find which host is acting a Primary-Master. This is the query you can use:

           FROM performance_schema.replication_group_members 
| mysql3  |
1 row in set (0.00 sec)

Much easier isn’t it ?

I let you discover the other improvements and features in MySQL 8.0.2 and don’t forget that your feedback is very important !

4 thoughts on “MySQL Group Replication: who is the primary master – updated!

  1. this is a good improvement. but i want to know two questions:
    1、is it will support rejoin when one member is offline after a network issue?
    2、at present,mysql shell can not start the cluster stabilize,now have a bug can not fetch the mgr group_name, is it will have feature after cluster restart with all members,mgr will auto recover cluster like galera cluster?

  2. Hi,

    There is a rejoinInstance() adminAPI command to rejoin a node after it was offline. There is also another command when the full cluster was down: rebootClusterFromCompleteOutage()

    Check: and

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I deeply value the diversity of MySQL developers, users, community and my blog readers. I cannot agree the suffering, oppression, and systemic racism the Black community faces every day. Black lives matter.