All Products
Search
Document Center

PolarDB:STOP SLAVE

Last Updated:Mar 28, 2026

Stops one or all primary/secondary replication links created by CHANGE MASTER TO.

Syntax

STOP SLAVE [channel_option]

channel_option:
    FOR CHANNEL channel

Usage notes

  • Run this statement with a privileged account of the current instance.

  • SLAVE and REPLICA are interchangeable in this statement with identical semantics.

  • Without FOR CHANNEL: stops all replication links on the instance.

  • With FOR CHANNEL channel: stops only the specified replication link.

Examples

Stop all replication links on the instance:

STOP SLAVE;

Stop the replication link named TEST:

STOP SLAVE FOR CHANNEL 'TEST';

See also

  • CHANGE MASTER TO — creates or modifies a replication link.