Friday, 12 December 2014

FIX: master and slave have equal MySQL server UUIDs

Newer versions of mysql use a unique UUID to do what the server variable server-id used to do.

That means if you need to do master/slave db replication each server will need its own UUID.

If the two servers have the same UUID, you will receive an error when attempting to sync the slave to the master:

master and slave have equal MySQL server UUIDs


If you are creating servers those servers from a virtual machine template then you will need to clear the UUID on each copy you make.

To do this, stop the mysql server and simply remove the file that contains the UUID

rm /var/lib/mysql/auto.cnf  


When you start the server again it will generate a new one automatically.

No comments: