All we need is an easy explanation of the problem, so here it is.
I have a database which used to be setup as a master in a topology. Now I want to remove it as master, and make it a replica. How do I do this?
Is there something similar to how to stop slave but for master? For slaves I could do:
STOP SLAVE; RESET SLAVE ALL;
I have tried
STOP MASTER; and
RESET SLAVE MASTER; but those does not exist.
What would the corresponding commands be for master?
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
There’s RESET MASTER, but that just removes the binary logs and resets the binlog file number to 1. It doesn’t prevent replicas from connecting. But they will be very confused if they connect and the binlog file number has been reset.
You could revoke REPLICATION SLAVE privilege from the username used by any of the replicas that are currently connecting.
Or you could disable binary logs, which is accomplished by removing the
log_bin option from your server options file and restarting. AFAIK, you cannot disable the binary log dynamically.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂