MySQL standby & chained replication
Having the current setup (not using GTID) (see link to image):
- PRODUCTION NODES: MASTER (A) -> SLAVE (A1) + SLAVE (A2)
- STANDBY NODES: -> SLAVE (B) (with log_slave_updates enabled) -> SLAVE (B1) + SLAVE (B2)
The standby nodes are meant to be promoted to the main production nodes if main MASTER (A) fails. So, if the MASTER (A) fails, we want to promote SLAVE (B) to master and nullify all (A) Nodes. So what we plan is the following commands for the this scenario:
- MASTER (A) fails and cannot be recovered
- SLAVE (B) execute:
STOP SLAVE
andRESET MASTER
; - SLAVES (B1, B2) execute:
STOP SLAVE
,RESET SLAVE
,START SLAVE
;
Is this correct?