The MySQL Router is written using the C++11 standard. As such, you must compile the code before you can install it. Compilation is typical of most C++ applications, as demonstrated below.
The CMake program provides control over how you configure a MySQL Router source distribution. Typically, you do this using options on the CMake command line. For information about options supported by CMake, run either of these commands in the top-level MySQL Router source directory:
shell> cmake . -LH shell> ccmake .
The default CMake installation prefixes are used. It is different
for each platform, but for most Unix-like platforms it is
/usr/local". It is possible to alter the
installation path with the CMake variable
shell> mkdir build && cd build shell> cmake .. -DINSTALL_LAYOUT=STANDALONE -DCMAKE_INSTALL_PREFIX=/opt/mysql/router8.0
Notice we use the
option to use the same installation layout as used for .tar.gz and
.zip packages. This is the recommended setting for building the
The CMake options are not documented here, but they are similar to the MySQL Server CMake options. For additional (related) information, see MySQL Source-Configuration Options.
Download and unpack the source files, and then follow the steps specific to your platform.
shell> tar xzf mysql-router-8.0.26-src.tar.gz shell> cd mysql-router-8.0.26-src
Once this is complete, you need to configure and compile MySQL Router
using cmake. Our examples use the default installation location of
Installing MySQL Router generates a file named
install_manifest.txt that lists all files
(with paths) installed on the system. This file is useful for
uninstalling MySQL Router.
However, there are prerequisites for compiling the MySQL Router source code.