Installing MariaDB

MariaDB is used as the mySQL database software for Analytics databases. Version 10.0.x is the currently supported version.

Make sure there is no existing installation of mysql server in place. As the root user, execute the following:
rpm -qa | grep -i mysql-server

If one exists, remove it before proceeding.

If it isn't already installed, install the Perl Database Interface Module (DBI) with the following command as the root user:
yum -y install perl-DBI
  1. Create a custom MariaDB version 10.0.x YUM repository. The following example shows information for a CentOS 7 installation. For more information, see
    1. As the root user, navigate to the /etc/yum.repos.d directory.
      cd /etc/yum.repos.d
    2. Edit a file with vi called MariaDB.repo and cut and paste the following text into the file.
      # MariaDB 10.0 CentOS repository list
      name = MariaDB
      baseurl =
  2. When the MariaDB.repo file is in place, install the MariaDB server:
    yum -y install mariadb-server
  3. Add the following configuration settings:
    echo "[mysqld]" >> /etc/my.cnf
    echo "table_open_cache=16K" >> /etc/my.cnf
    echo "table_definition_cache=16K" >> /etc/my.cnf
    echo "tmp_table_size=2G" >> /etc/my.cnf
    echo "max_heap_table_size=2G" >> /etc/my.cnf
    echo "join_buffer_size=512K" >> /etc/my.cnf
    echo "open_files_limit=200000" >> /etc/my.cnf
    echo "tmpdir=/tmp" >> /etc/my.cnf
    echo "wait_timeout=86400" >> /etc/my.cnf
    echo "innodb_adaptive_hash_index=OFF" >> /etc/my.cnf
    echo "innodb_buffer_pool_size=6G" >> /etc/my.cnf
    echo "innodb_log_file_size=1892M" >> /etc/my.cnf
    echo "innodb_log_buffer_size=128M" >> /etc/my.cnf
  4. Start the MariaDB mysql server for the first time:
    /etc/init.d/mysql start
    You can confirm success by connecting to the database server as follows:
    mysql -u root

    If mysql fails to start, it is highly likely you have a /etc/my.cnf configuration file misconfiguration or environmental preparation was not completed correctly. You can check the /var/lib/mysql/<server fqdn>.err file for details of why startup was not successful. You should correct any issues and confirm successful server start before proceeding further with the installation.

  5. Set MariaDB to start on boot:
    systemctl enable mysql
  6. Optionally, if you wish to enable remote access to the database server (that is, you have opened port 3306), you can grant remote access to the root and reporting_read users (Analytics installation will create the later as a read-only user otherwise.)
    mysql -u root
    grant all privileges on *.* to 'root'@'%' with grant option;
    grant all privileges on *.* to 'reporting'@'%' with grant option;
    flush privileges;