1

I have to upgrade a MySQL replication topology from 5.7 to 8.0 without database downtime. It’s MySQL Community Edition.

There is one source and 5 replicas in the topology and connections happen via ProxySQL Cluster of 3 nodes. Out of the 5 replicas, 2 replicasserve application connections in read_only mode. All the replicas replicate from the master A.

The Source is A, and the Replicas are - B, C, D, P1, P2. P1 and P2 are production replicas where application connections come.

I am confused on how do I plan the upgrade without downtime. If it was simple source-replica replication, it wouldn't have been a problem. This Percona blog provides step-by-step guide.

My understanding so far

  1. Upgrade slave B, also upgrade rest of the replicas in the topology
  2. Change ProxySQL configuration and remove source A from the topology and make new source B writeable in the ProxySQL,
  3. Stop application, modify the application connection parameters. Meanwhile let B catch with A. Use SHOW MASTER STATUS on A and SHOW REPLICA STATUS on B to verify the coordinates match. Once they catch up, note SHOW MASTER STATUS on B.
  4. Change replication for all the replicas to the new source B.
  5. Once the connections start coming to new source B, old source A is free to be upgraded.
  6. Once A is upgraded, I can bring it back in the topology to serve as a replica.

Please help me out understanding the process. I am getting confused because of additional slaves and production slaves as well.

Testing of MySQL version 8 is complete and there's green signal for upgrades. I am aware of the things that are supposed to be taken care of before the servers are upgraded and that there's no going back hence backup is important.

2
  • Is PXC a part of the topology?
    – Rick James
    Commented Oct 3, 2022 at 17:44
  • @RickJames There’s no Percona Cluster, it’s a simple MySQL master slave replication on Community edition. ProxySQL is used for connection routing. Commented Oct 3, 2022 at 19:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.