1200
MariaDBERRORNotableReplicationHIGH confidence
Server is not configured as a slave
Production Risk
Low — configuration issue, no data affected.
What this means
ER_BAD_SLAVE (1200, SQLSTATE HY000) is raised when replication commands are run on a server that has not been configured as a replica. The master host and connection parameters have not been set.
Why it happens
- 1Running START SLAVE or SHOW SLAVE STATUS on a server without CHANGE MASTER TO having been executed
- 2Replication configuration lost after server restart (missing my.cnf settings)
How to reproduce
trigger — this will error
trigger — this will error
-- On a fresh server with no replication config START SLAVE;
expected output
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO
Fix
Configure replication with CHANGE MASTER TO
Configure replication with CHANGE MASTER TO
CHANGE MASTER TO MASTER_HOST = 'primary-host', MASTER_USER = 'repl_user', MASTER_PASSWORD = 'password', MASTER_LOG_FILE = 'mysql-bin.000001', MASTER_LOG_POS = 4; START SLAVE;
Why this works
Provides the replica with the necessary connection details to connect to the primary.
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1200 ER_BAD_SLAVE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev