Charmed MySQL How-to - Upgrade Juju for new DB revision

How-to migrate on new Juju version

The juju controller upgrade and model upgrade are well documented.
For tech details, read the upgrade Juju for new DB revision explanation.

Note: All Juju application continues running during the entire Juju upgrade process.

Juju 3.1.5 → 3.1.8: the PATCH level Juju version upgrade:

> sudo snap refresh juju 

> juju upgrade-controller
# wait for upgrade controller completed

> juju upgrade-model
# wait for upgrade model completed

Juju 3.1.8 → 3.5.1: the MAJOR/MINOR Juju version upgrade (using migrate):

> sudo snap refresh juju --channel 3.5/stable # choose necessary version/channel

> juju bootstrap lxd lxd_3.5.1 # --agent-version 3.5.0
Bootstrap complete, controller "lxd_3.5.1" is now available

> juju migrate lxd_3.1.8:mydatabase lxd_3.5.1
Migration started with ID "5f227519-3cdb-4538-871c-1c4589a4598a:0"
# wait for model migration completed

> juju upgrade-model -m lxd_3.5.1:mydatabase
best version:
started upgrade to 3.5.1
# wait for upgrade model completed

To complete the charm upgrade itself: refresh the charm following the manual.