Skip to content

Instantly share code, notes, and snippets.

@detain
Created July 7, 2024 20:28
Show Gist options
  • Save detain/114c0876278a619386013b54a4d4896b to your computer and use it in GitHub Desktop.
Save detain/114c0876278a619386013b54a4d4896b to your computer and use it in GitHub Desktop.
InnoDB Cluster Upgrade Instructions for 0 Downtime

Lets assume you have a multi-primary cluster and you want to upgrade the nodes without taking them offline.
For this say we have 3 nodes, mysqlcluster1, mysqlcluster2, and mysqlcluster3 and the cluster is currently online.

  1. Move all traffic to mysqlcluster1
  2. Do upgrades on mysqlcluster2 and mysqlcluster3, when they finish the update they will auto rejoin the cluster but stay as R/O
  3. stop mysql on mysqlcluster1, as soon as you do that mysqlcluster2 and mysqlcluster3 will go R/W
  • You will have to either:
    • time switching your db hosts in your configs with when you bring down mysqlcluster1
    • use mysqlrouter to automatically switch-over
  1. move all traffic to mysqlcluster2 and mysqlcluster3
  2. upgrade mysqlcluster1, it will automatically rejoin cluster and then go R/W when done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment