来验证下:此时 node_b 为主节点,node_a 降为从节点。 MySQL debian-ytt1:3601 ssl Py > c1.status().get("defaultReplicaSet").get("topology"){ "node_a": { "address": "127.0.0.1:3601", "mode": "R/O", "readReplicas": {}, "replicationLag": null, "role": "HA", "status": "ONLINE", "version": "8.0.21" }, "node_b": { "address": "127.0.0.1:3602", "mode": "R/W", "readReplicas": {}, "replicationLag": null, "role": "HA", "status": "ONLINE", "version": "8.0.21" }, "node_c": { "address": "127.0.0.1:3603", "mode": "R/O", "readReplicas": {}, "replicationLag": null, "role": "HA", "status": "ONLINE", "version": "8.0.21" }}