1

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?

0
4

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.