Prevent MySQL to connect Master We switched a slave to master today and after restarting the new master it tries to connect to the old master.

Even with stop slave;, it tries to connect after restarting.
You need to use RESET SLAVE to tell the instance to forget about its former master.

The exact commands to run depend on your MySQL version.

For MySQL versions prior to 5.5:

stop slave;
change master to MASTER_HOST='';
reset slave;


For MySQL 5.5 and above:

stop slave;
reset slave all;


Either way, make sure that you also remove any “master-” statements from my.cnf if you have them.