3062
MariaDBERRORNotableReplicationHIGH confidence

Replication channel I/O thread must be stopped

Production Risk

Medium — replication is interrupted during reconfiguration.

What this means

An operation was attempted that requires the I/O thread of a named replication channel to be stopped first.

Why it happens
  1. 1Issuing CHANGE MASTER TO while the I/O thread is still running.
  2. 2Attempting to reconfigure a channel without stopping its threads.
How to reproduce
trigger — this will error
trigger — this will error
CHANGE MASTER TO MASTER_HOST='new_host' FOR CHANNEL 'ch1';

expected output

ERROR 3062 (HY000): This operation cannot be performed with a running slave io thread; run STOP SLAVE IO_THREAD FOR CHANNEL 'ch1' first.

Fix

Stop the I/O thread first

Stop the I/O thread first
STOP SLAVE IO_THREAD FOR CHANNEL 'ch1';
CHANGE MASTER TO MASTER_HOST='new_host' FOR CHANNEL 'ch1';
START SLAVE IO_THREAD FOR CHANNEL 'ch1';

Why this works

Stopping the thread allows safe reconfiguration.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3062 ER_SLAVE_CHANNEL_IO_THREAD_MUST_STOP2

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

← All MariaDB errors