patternsqlMinor
Is there a way to stop MySQL Replication on the master?
Viewed 0 times
thewayreplicationstopmysqlmasterthere
Problem
I want the master to stop replicating data to the slave. I know I can do that on the slave with
One possible solution might be to change the
What I'm looking for is a statement like
STOP SLAVE;, but I wonder if there is a way to do it in the master.One possible solution might be to change the
server_id to 0, but in this case I'll have to restart mysql in the master for changes to take effect.What I'm looking for is a statement like
STOP MASTER;.Solution
There does not exist a
Running either of these will get you the following:
The IO Thread is what communicates with the Master. Killing the IO Thread on the Master Side using the
STOP MASTER; command nor is there a manual mechanism from the Master to stop Replication. You would have to go to each Slave and run on of the following:STOP SLAVE;(Kills the IO Thread and SQL Thread)
STOP SLAVE IO_THREAD;(Kills the IO Thread only)
Running either of these will get you the following:
- Clean Recording of the Replication Coordinates in
master.info
- Master_Log_File
- Read_Master_Log_Pos
- Relay_Master_Log_file
- Exec_Master_Log_Pos
The IO Thread is what communicates with the Master. Killing the IO Thread on the Master Side using the
KILL command would abort the IO Thread on each Slave. That could corrupt the Clean Recording of Replication Coordinates.Context
StackExchange Database Administrators Q#40541, answer score: 9
Revisions (0)
No revisions yet.