Setting a Slave to Master

Hi,

I’m currently looking for the correct way of settings a slave to a master. We currently have a single Percona 5.5 instance which is hosting a series of databases. The plan is to start moving databases to a new instance (sharing the load of databases equally). In order to minimize downtime, Mysql Replication is currently used to bring the new instance up to speed for a specific database (replicate-wild-do-table).

Now, we would like to start using the Slave Instance to start being a master for the database which has full replicated… Therefore the end result is to stop Mysql replication on the new instance, and set it as master…

The procedure which I believe i should perform is:

On Master:

FLUSH LOGS;

On Slave:

STOP SLAVE;
RESET MASTER;
CHANGE MASTER TO MASTER_HOST=‘’;

The ultimate result should be that the current master remains as a master and continues serving the other databases (We should not loose any binglogs)

The slave server should become a master only and start serving requests for the database which has been replicated… It should not effect the other database server in anyway…

Thanks for any insight you can provide

I don’t see the point of running FLUSH LOGS on the master. You could just run those commands on the slave.

You say your goal is to share the load of some databases. Are you sure a single db-server cannot handle your workload after some optimization?

This is sorted, completed the migration today…

to effectively break Slave communcation i used RESET SLAVE ALL.