1198
MariaDBERRORNotableReplicationHIGH confidence

Operation cannot be performed with a running slave

Production Risk

Low — no data affected; just a configuration guard.

What this means

ER_SLAVE_MUST_STOP (1198, SQLSTATE HY000) is returned when you attempt a replication management command that requires the slave threads to be stopped first, such as CHANGE MASTER TO.

Why it happens
  1. 1Running CHANGE MASTER TO while the replica is actively replicating
  2. 2Attempting to reset replication parameters without stopping the slave
How to reproduce
trigger — this will error
trigger — this will error
CHANGE MASTER TO MASTER_HOST='newhost';  -- fails if slave is running

expected output

ERROR 1198 (HY000): This operation cannot be performed with a running slave; run STOP SLAVE first

Fix

Stop the slave before making changes

Stop the slave before making changes
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='newhost', MASTER_PORT=3306;
START SLAVE;

Why this works

Stopping replication threads allows safe modification of replication configuration.

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1198 ER_SLAVE_MUST_STOP

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors