Can I remove the middle slave in a MySQL "master -> slave -> slave" setup? Let's say I have the following setup:

Master -> Slave1 -> Slave2

I would like to remove the middle slave, Slave1, and have the following:

Master -> Slave2

My gut is that I can do the following:


Stop the Master -> Slave1 replication. 
After Slave1 ->
Slave2 replication catches up, stop that replication as well.
CHANGE MASTER on Slave2 to point to Master 
Turn on replication on Slave2
Enjoy new Master -> Slave2 setup.


Is this something that would work?
Add additonal step to avoid any confusion you could do flush tables with read lock after replication is caught up as it will do global lock and would avoid conflict in case of any change coming up, use unlock tables at the end to release the lock acquired. Moreover it would be better to have this done in low/off production time in case it is in production, other steps seems to fine

Hope it helps.