Sriram Patil
Master of Technology (Computer Science) student @ IIIT Hyderabad
Follow Me on Twitter!
Sriram Patil
Master of Technology (Computer Science) student @ IIIT Hyderabad
Follow Me on Twitter!
Sriram Patil
Master of Technology (Computer Science) student @ IIIT Hyderabad
Follow Me on Twitter!
  • rss
  • archive
  • MaxScale Installation and Configuration

    I have started working with MariaDB as part of Google Sumer of Code 2015. I will be working on MaxScale issue MXS-2. The first step before starting work was to install and configure MaxScale. This post will give a general idea about the MaxScale configuration.

    MaxScale works with almost all versions of MariaDB (>= 5.5 and

    1. Running multiple MariaDB instances on single machine. Using this blog I configured 4 instances on my machine. It also provides a simple script for the same.
    2. Setting up master-slave replication for MariaDB. I configured one master and three slaves on single machine. There are two resources for setting up the replication - MariaDB official Blog post and Ivan’s blog.
    3. It is better to install MaxScale from source code. The official documentation for building MaxScale from source code gives all the requirements for several Linux distributions. I am using Ubuntu 14.04 and apart from the listed packages in the documentation, I had to install libcurl4-openssl-dev and libpcre3-dev for running cmake.
    4. And again for configuring MaxScale, the official blog post and Ivan’s blog are sufficient. One can also check if it is working fine by executing example commands mentioned in the blogs.

    All the above links give enough instructions on how to get started with MariaDB replication and setting up MaxScale. Apart from these, following is some useful stuff that I discovered while setting up.

    • To check replication error (if any) one can use show slave status\G command on slave database server. The error field will be empty if replication setup is fine.
    • Always refer “localhost” by a loopback address (e.g. 127.0.0.1) in configuration files as well as when specifying host to connect to in mysql command.
    • User localhost_match_wildcard_host=1 when specifying router service. This allows MaxScale to match ‘%’ with ‘localhost’.
    • Turn on debugging to spot errors in MaxScale setup. Add the log flags in configuration file under [maxscale] section. The log flags are log_trace, log_messages and log_debug. Set all these to 1. The log files are stored in folder $MAXSCALE_HOME/log.

    Feel free to point out mistakes, if any. Also, suggestions and/or reviews are welcome! 

    • May 31, 2015 (8:46 am)
    • #maxscale
    • #mariadb
    • #gsoc15
    • #gsoc
© 2011–2024