Compiling and Using the MySQL Router Labs Release

Last week we releasedMySQL Router into our Labs and we need to provide a few extra details on how to actually use it.

Requirements

A modern OS which comes with a compiler supporting C++11. For example, Ubuntu 14.04 and later, Oracle Linux 7, OS X 10.10. Oracle Linux 6 works as well, but you have to install the DevtoolSet 3 software collection.

MySQL Client Libraries development packages.

CMake 2.8.9 or later

You need also a few MySQL servers running to actually test Router. MySQL Fabric is not strictly required, but you would not be able to use Fabric Cache.

Installation

First, download the TAR or ZIP archive from labs.mysql.com and unpack it.

1

2

3

4

$tar xzf mysql-router-2.0.1-src.tar.gz

$cd mysql-router-2.0.1-src

$mkdir build

$cd build

Configure and compile MySQL Router using CMake. We are installing in the default location, /usr/local/:

1

2

3

$cmake..

$make

$sudo make install

Notice the file named install_manifest.txt, it is useful to uninstall.

Now you can do some basic tests:

1

2

3

4

$mysqlrouter--version

MySQL Router v2.0.1on OSXv10.10(64-bit)(GPL community edition)

$mysqlrouter--help

..

Configuration

Router looks in 2 locations by default for its configuration file:

/etc/mysql/mysqlrouter.ini

.mysqlrouter.ini in your $HOME directory.

You can see them when using the --help option.

You can also specify any custom locations using the -c /path/to/config_file.ini command line option.