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

on
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

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:

mysql-sql> SELECT MEMBER_HOST as `PRIMARY` 
           FROM performance_schema.replication_group_members 
           WHERE MEMBER_ROLE='PRIMARY';
+---------+
| PRIMARY |
+---------+
| 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 !

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

2 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?

Leave a Reply

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

recent

Last Tweets Last Tweets

Locations of visitors to this page
categories