Promoting a slave to a master in a single master, multiple slave environment
Hi: I have 3 databases in a master and 2 slave setup. I would like to shutdown master and promote one of the slaves to be the master. I have reviewed multiple sites. Instructions vary slightly depending on when the document was created. Was hoping someone can review my steps and let me know if I am missing something.
I have mysql 5.7.22
1. Shutdown database M
2. On S1 and S2, run
STOP SLAVE IO_THREAD;
3. SHOW PROCESSLIST on S1 and S2 should say "Slave has read all relay log; waiting for more update"
4. On S1
STOP SLAVE;
RESET MASTER;
5. On S2
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST=S2' MASTER_USER=’slave’, MASTER_PASSWORD=......';
RESET SLAVE;
START SLAVE;
Subject
Views
Written By
Posted
Promoting a slave to a master in a single master, multiple slave environment
909
October 11, 2018 01:49PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.