MySQL Router 9.3
There are binary distributions of MySQL Router available for several variants of Linux, including Fedora, Oracle Linux, Red Hat, and Ubuntu.
Installation options include:
Official MySQL Yum or APT repository packages: These binaries are built by the MySQL Release team. For additional information about installing these, see the quick guides for installing them using Yum or APT.
Download official MySQL packages: Downloads are available at https://dev.mysql.com/downloads/router. Download and install using your preferred package manager.
Download the source code and compile
yourself: The source code is available as part of
MySQL Server at https://dev.mysql.com/downloads/mysql.
Alternatively, the source code is also
available
on GitHub (specifically in the
router
directory).
For information about compiling MySQL Router, see Installing MySQL Router from Source Code.
The procedure for installing on Linux depends on your Linux distribution.
Installing MySQL Router using an official DEB or RPM package creates a
local system user and group named "mysqlrouter" on the host that
MySQL Router runs as by default. For additional information, see the
system
user
's
configuration option.
On Ubuntu, and other systems that use the Debian package scheme, you can either download and install .deb packages or use the APT package manager.
Install the MySQL APT repository as described in the MySQL APT Repository documentation. For example:
Download the APT configuration package from here.
$> sudo dpkg -i mysql-apt-config_0.8.30-1_all.deb
Choose the desired MySQL Server series to install, such as MySQL Server 8.4. Choose Innovation to install and upgrade to the latest Innovation series, which today installs MySQL 9.3. This choice also determines the MySQL Router version that is installed from the MySQL repository.
Update your APT repository:
$> sudo apt-get update
Install MySQL Router. For example:
$> sudo apt-get install mysql-router
You can also download the .deb package and install it from the command line similarly to
$> sudo dpkg -i package
.deb
is
the MySQL Router package name; for example,
package
.debmysql-router-community-
,
where version
-1ubuntu23.04_amd64.debversion
is the MySQL Router version
number.
On RPM-based systems, you can either download and install RPM packages or use the Yum package manager.
First, install the MySQL Yum repository as described in the MySQL Yum Repository documentation. For example:
Download the Yum configuration package from here.
$> sudo rpm -Uvh mysql84-community-release-el7-1.noarch.rpm
Next, optionally change the active MySQL Server version, which defaults to MySQL 8.4 LTS. For example, to install and upgrade to the latest Innovation version (which is MySQL 9.3 today) from both the MySQL Server (mysql) and MySQL Router (part of mysql-tools) subrepositories:
$> sudo yum-config-manager --disable mysql-8.4-lts-community $> sudo yum-config-manager --enable mysql-innovation-community $> sudo yum-config-manager --disable mysql-tools-8.4-lts-community $> sudo yum-config-manager --enable mysql-tools-innovation-community
Now both installations and upgrades will use the latest version from the current Innovation series.
Next, install MySQL Router. For example:
$> sudo yum install mysql-router-community
$> sudo rpm -i package
.rpm
is
the MySQL Router package name; for example,
package
.rpmmysql-router-community-
,
where version
-el7.x86_64.rpmversion
is the MySQL Router version
number.
The procedure for uninstalling MySQL Router on Linux depends on the package you are using.
To uninstall a Debian package, use this command:
$> sudo dpkg -r mysql-router
This command does not remove the configuration files. To also remove them and the data directory, use:
$> sudo dpkg --purge mysql-router
Alternatively, use apt-get remove
mysql-router
or apt-get purge
mysql-router
.
To uninstall an RPM package, use this command:
$> sudo rpm -e mysql-router-community
Similarly, use yum remove
mysql-router-community
.
This command does not remove the configuration files.
When not purging, the uninstallation process does not remove your configuration files. On Debian systems, this might include files such as:
/etc/init.d/mysqlrouter /etc/mysqlrouter/mysqlrouter.conf /etc/apparmor.d/usr.sbin.mysqlrouter