3068
MariaDBERRORNotableReplicationHIGH confidence
Replication channel already exists
Production Risk
Medium — intended replication target may not be configured.
What this means
An attempt was made to create a replication channel with a name that already exists.
Why it happens
- 1Issuing CHANGE MASTER TO FOR CHANNEL with a name that is already in use and ADD SOURCE is not intended.
How to reproduce
trigger — this will error
trigger — this will error
CHANGE MASTER TO MASTER_HOST='host2' FOR CHANNEL 'existing_channel';
expected output
ERROR 3068 (HY000): Channel 'existing_channel' already exists.
Fix 1
Stop and reconfigure the existing channel
Stop and reconfigure the existing channel
STOP SLAVE FOR CHANNEL 'existing_channel'; CHANGE MASTER TO MASTER_HOST='host2' FOR CHANNEL 'existing_channel';
Why this works
Reconfiguring stops the channel first, then updates the host.
Fix 2
Use a unique channel name
Use a unique channel name
CHANGE MASTER TO MASTER_HOST='host2' FOR CHANNEL 'new_channel';
Why this works
Creates a separate multi-source replication channel.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3068 ER_CHANNEL_ALREADY_EXISTS2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev