Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

How MySQL Group Replication get primary node ip address

$
0
0

According to MYSQL 5.7 Reference Manual :

We can use the sql below to find the primary-node's hostname when group replication is deployed in single-mode :

mysql> SELECT * FROM performance_schema.replication_group_members WHERE MEMBER_ID = (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME= 'group_replication_primary_member');
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| CHANNEL_NAME              | MEMBER_ID                            | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
| group_replication_applier | 9176f4d3-c7f6-11e6-bcf7-fa163ee40410 | myhost      |       24801 | ONLINE       |
+---------------------------+--------------------------------------+-------------+-------------+--------------+
1 row in set (0.00 sec)

the question is : How to get ip address instead of hostname ?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>