Switching the slave from chain replication to master-slave

If you have a chain replication setup (such as server A --> sever B --> server C) and you wish to make server C a direct slave of server A, you have to stop replication on server B, let server C catch up with server B, and then find the coordinates of server A  corresponding to the position where server B stopped. Using those coordinates, you can execute a CHANGE MASTER TO command on server C and make it a slave of server A.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.