ERROR 1200 (HY000): The server is not configured as slave

So, you’ve restarted mysqld, and the slave did not start. You issue SHOW SLAVE STATUS\G and notice that everything is fine but “Slave_IO_Running” and “Slave_SQL_Running” both say “No”. You don’t have skip-slave-start in your my.cnf file. Why did this happen? Baffled- you issue “START SLAVE;” and get:
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO

This has happened to me numerous times throughout my time administering mysql servers. It does not happen frequently enough to not baffle you at the first glance, but then you start remembering last time this happened..

The variable server_id always need to be set to something when running replication. Check if server_id is set by issuing “SHOW VARIABLES LIKE ‘server_id’;. The value should not be “0″ or “1″. “1″ is normally set by default. Also, the master’s server_id and the slave’s server_id should not be the same.

You can set the server id by issuing “SET GLOBAL server_id=;” then issue a START SLAVE;

We should be fine now..

Ugh, I know this is fairly easy to find, but in an attempt to have this fresher in memory, a quick blog post helps remembering. :)

Leave a comment

Your comment