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, MySQL Router must be upgraded as a part of the metadata upgrade procedure described in the MySQL Shell guide at Upgrade Metadata Schema.
MySQL Router logs indicate if existing metadata is incompatible with the new 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, another bootstrap operation is required to use them. For example, 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.
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.