Cloning MySQL 5.6 instances

A tip for all those cloud users that like cloning database servers (as reported in my book Effective MySQL – Replication Techniques in Depth ).

Starting with MySQL 5.6, MySQL instances have a UUID . Cloning servers to quickly create slaves will result in the following error message.

mysql> SHOW SLAVE STATUSG
...
  Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work.
...

The solution is simple. Clear our the file based configuration file (located in the MySQL datadir) and restart the MySQL instance.

$ rm -f /mysql/data/auto.cnf
$ service mysql restart
Tagged with: Databases MySQL

Related Posts

Improved Security with MySQL 5.6

Installed on a clean CentOS 6.4 AWS instance. sudo su - cd /tmp wget http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-5.6.13-1.el6.x86_64.rpm-bundle.tar tar xvf MySQL-5.6.13-1.el6.x86_64.rpm-bundle.tar yum install -y libaio perl rpm -i MySQL*.rpm The following output is the sign that security is being considered with new MySQL versions.

Read more

Basic scalability principles to avert downtime

In the press in the last two days has been the reported outage of Amazon Web Services Elastic Compute Cloud (EC2) in just one North Virginia data center. This has affected many large website includes FourSquare , Hootsuite , Reddit and Quora .

Read more

Use Replication for backups? Are you schemas consistent?

Many people have a master/slave MySQL environment of various different topologies, and many use the slave as a backup. Is your slave schema identical to your production schema? As long as an SQL statements completes without an error, your slave schema can differ.

Read more