1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| MySQL dax-mysql-master:3306 JS > cluster.status(); { "clusterName": "prodCluster", "defaultReplicaSet": { "name": "default", "primary": "dax-mysql-master:3306", "ssl": "DISABLED", "status": "OK_NO_TOLERANCE", "statusText": "Cluster is NOT tolerant to any failures.", "topology": { "dax-mysql-master:3306": { "address": "dax-mysql-master:3306", "mode": "R/W", "readReplicas": {}, "role": "HA", "status": "ONLINE" }, "dax-mysql-slave:3306": { "address": "dax-mysql-slave:3306", "mode": "R/O", "readReplicas": {}, "role": "HA", "status": "ONLINE" } } }, "groupInformationSourceMember": "mysql://repl@dax-mysql-master:3306" }
root@db 17:14: [mysql_innodb_cluster_metadata]> SELECT * FROM performance_schema.replication_group_members; +---------------------------+--------------------------------------+------------------+-------------+--------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | +---------------------------+--------------------------------------+------------------+-------------+--------------+ | group_replication_applier | bddd9c32-8fee-11e8-ac79-525400edbe8d | dax-mysql-slave | 3306 | ONLINE | | group_replication_applier | d5bd8edd-9a1d-11e8-993e-525400578639 | dax-mysql-master | 3306 | ONLINE | +---------------------------+--------------------------------------+------------------+-------------+--------------+ 2 rows in set (0.00 sec)
root@db 17:14: [mysql_innodb_cluster_metadata]> show status like '%primary%'; +----------------------------------+--------------------------------------+ | Variable_name | Value | +----------------------------------+--------------------------------------+ | group_replication_primary_member | d5bd8edd-9a1d-11e8-993e-525400578639 | +----------------------------------+--------------------------------------+ 1 row in set (0.01 sec)
|