MySQL localhost:3306 ssl JS > rs.setPrimaryInstance('127.0.0.1:3308')
MySQL localhost:3306 ssl JS > rs.status()
{
"replicaSet": {
"name": "renzy",
"primary": "127.0.0.1:3308",
"status": "AVAILABLE",
"statusText": "All instances available.",
"topology": {
"127.0.0.1:3306": {
"address": "127.0.0.1:3306",
"instanceRole": "SECONDARY",
"mode": "R/O",
"replication": {
"applierStatus": "APPLIED_ALL",
"applierThreadState": "Slave has read all relay log; waiting for more updates",
"receiverStatus": "ON",
"receiverThreadState": "Waiting for master to send event",
"replicationLag": null
},
"status": "ONLINE"
},
"127.0.0.1:3307": {
"address": "127.0.0.1:3307",
"instanceRole": "SECONDARY",
"mode": "R/O",
"replication": {
"applierStatus": "APPLIED_ALL",
"applierThreadState": "Slave has read all relay log; waiting for more updates",
"receiverStatus": "ON",
"receiverThreadState": "Waiting for master to send event",
"replicationLag": null
},
"status": "ONLINE"
},
"127.0.0.1:3308": {
"address": "127.0.0.1:3308",
"instanceRole": "PRIMARY",
"mode": "R/W",
"status": "ONLINE"
}
},
"type": "ASYNC"
}
}