MySQL Router 8.0  /  Installing MySQL Router  /  Upgrading MySQL Router

2.6 Upgrading MySQL Router

MySQL Router as a part of InnoDB Cluster

MySQL Router is most commonly used as an InnoDB Cluster component; with Router bootstrapped against the cluster. For related information, see Section 3.1, “Bootstrapping MySQL Router”.

If No Metadata Upgrade Needed

MySQL Router can be upgraded independently of the InnoDB Cluster components if a metadata upgrade is not needed.

Since the assumption is that the Router configuration file and state file remain backward compatible, the simplest upgrade scenario is to install a new version using an installer/upgrade package for the system. In most cases, the installer handles stopping and restarting the running instance after the upgrade. If that is not the case (such as installing from the source or a tar.gz archive) then the running Router instance must be manually stopped and restarted after the installation/upgrade process.

If a Metadata Upgrade Needed

When the InnoDB Cluster requires a cluster metadata schema upgrade (for example, the metadata schema changed from version 1.x to 2.x between the 8.0.18 and 8.0.19 Router releases) then Router must be upgraded as a part of the metadata upgrade procedure described in the MySQL Shell guide at Upgrade Metadata Schema.

The Router logs indicate if existing metadata is incompatible with the new Router version with an error, such as:

This version of MySQL Router is not compatible with the provided MySQL InnoDB cluster metadata

Bootstrapping Router after installing a new version

Usually bootstrapping is not needed after the upgrade. The exceptions to this are:

  • If the new Router version introduces new capabilities that requires another bootstrap operation to use them. For example, ClusterSet support was added in MySQL Router 8.0.28. In this case, if an active cluster is part of a ClusterSet, bootstrapping sets up the appropriate configuration options to work with a ClusterSet.

  • If the new MySQL Router is installed at a different location than the previous version; in that case the configuration file will contain paths (such as plugin_folder) to the previous installation. Manually changing the existing configuration file is an alternative.

Standalone MySQL Router (not a part of InnoDB Cluster)

Since the assumption is that the Router configuration file and state file remain backward compatible, the simplest upgrade scenario is to install a new version using an installer/upgrade package for the system. In most cases, the installer handles stopping and restarting the running instance after the upgrade. If that is not the case (such as installing from the source or a tar.gz archive) then the running Router instance must be manually stopped and restarted after the installation/upgrade process.

The existing configuration file is likely compatible with the new version but would require adjusting to set newly added options.