STOP SLAVE

This MySQL statement stops the slave server threads.

Syntax

Below is the syntax for this command. Text within square brackets (i.e, [ and ] ) are optional. Choices are separated by bars (i.e, | ). Ellipses preceded by a comma indicates a repeating pattern. Ellipses before or after syntax are used to highlight a relevant except from the larger syntax. Text displayed in italic letters represent text that should be replaced with the specific names related to the database (e.g., column with the name of the column).

STOP SLAVE [IO_THREAD|SQL_THREAD]

Explanation

This MySQL statement stops the slave server threads on a MySQL server which is running replication. To stop a specific type of slave thread, specify one or both of the thread types. Both may be given—just separate them with a comma. However, the default is to stop both. This MySQL statement requires SUPER privilege. You can start slave threads with the START SLAVE statement—assuming your slave is configured for replication already.

Examples

Here is an example of this MySQL statement in which only the SQL threads are to be stopped:

STOP SLAVE SQL_THREAD;