MySQL server-id woes on Redhat/CentOS
Problem
You’re trying to set up MySQL database replication and despite having correctly set your server-id on the master and slave you keep seeing the following message in the slave server error log: Misconfigured master - server id was not set.
Solution
Bug #3829 states that you can not set the server-id using the SET GLOBAL command.
But I didn’t do that, I set it in my my.cnf and then reloaded MySQL. Whatevs, nerdz.
After much mucking around this morning I realised that reloading MySQL is roughly equivalent to using the SET GLOBAL command. If I think long and hard enough I suppose that makes sense. So…
service mysqld stop
service mysqld start
A few seconds outage on the production server, but now we’re in business.