User Tools

Site Tools


wiki:mysql_promote_slave_master

Mysql promote slave to master

1. On master: stop the application using the mysql DB

2. On slaves:

STOP SLAVE IO_THREAD;
SHOW PROCESSLIST; –> has to show message "Has read all relay log"

3. On slave which will be the new master:

STOP SLAVE;
RESET MASTER;

/var/log/mysql/ should be empty

4. Reconfigure stunnels if any.

5. On slaves:

STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3308;
START SLAVE;

6. Start your app on new master.

Tested on

See also

References

wiki/mysql_promote_slave_master.txt · Last modified: 2022/10/15 12:13 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki