Remove MySQL Replication: Fast Guide
To remove the master-slave configuration, you need to follow these steps:
- Firstly, log in to the MySQL master server and use the following command to stop the master-slave replication:
STOP SLAVE;
- Next, use the following commands to delete the replication configuration from the server:
RESET SLAVE;
- Next, on the primary server, use the following command to delete the connection configuration of the secondary server.
CHANGE MASTER TO MASTER_HOST='', MASTER_USER='', MASTER_PASSWORD='';
- Finally, if the MySQL instance is no longer needed on the server, it can be directly removed from the server.
By following the steps above, you can successfully delete the master-slave configuration. Please make sure to back up and confirm your actions before proceeding to prevent data loss.