OnApp Database Server Installation

  • For database server, each table is stored per single file and the server is configured using predefined config (my.cnf) based on total available amount of RAM.  
  • MariaDB new version 10.4 has been using to serve OnApp’s database since version 6.3 Edge 1. An extra --mariadb-custom (on CentOS 7.x) and --mariadb (on CentOS 6.x) options are required by database installer.

To install MySQL Server standalone (separately from Control Panel box) with the installer:

  • OnApp < 6.3:
  1. Install OnApp's YUM repository:

    # rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo.noarch.rpm
  2. Install the onapp-mysql package:

    # yum -y install onapp-mysql


  3. Run the installer:

    1. For CentOS 6:

      # /onapp/onapp-mysql/onapp-mysql.sh 
    2. For CentOS 7:

      # /onapp/onapp-mysql/onapp-mysql.sh --mariadb
  • OnApp >= 6.3:
  1. Install OnApp's YUM repository:

    # rpm -Uvh http://rpm.repo.onapp.com/repo/onapp-repo-6.3.noarch.rpm
  2. Install the onapp-mysql package:

    # yum -y install onapp-mysql


  3. Run the installer:

    1. For CentOS 6:

      # /onapp/onapp-mysql/onapp-mysql.sh --mariadb
    2. For CentOS 7:

      # /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom


 The installer options list:
# /onapp/onapp-mysql/onapp-mysql.sh -h
Usage: /onapp/onapp-mysql/onapp-mysql.sh [--mysqlsock MYSQL_SOCK | --mysqlhost MYSQL_HOST [--mysqlport MYSQL_PORT]] [-mysqluser MYSQL_USER] [-mysqlpasswd MYSQL_PASSWD] [--mariadb | --percona | --percona-cluster [--bootstrap] ] [-h|--help]


--mysqlhost MYSQL_HOST
IP address/FQDN where MySQL Server runs. Default values is 127.0.0.1.
--mysqlport MYSQL_PORT
TCP port where MySQL Server serves connections. Default values is 3306.
--mysqlsock MYSQL_SOCK
Unix socket on which MySQL Server serves connections. Default values is /var/lib/mysql/mysql.sock.
--mysqluser MYSQL_LOGIN
MySQL Server user with administrative privileges. Default value is 'root'.
--mysqlpasswd MYSQL_PASSWD
MySQL Server "root" user's password.
--grantfrom  GRANTED_HOSTS
A comma-separated list of hosts' IP addresses which are granted to access the MySQL Server with administrative privileges.
--with-grant-optionGrant access for GRANTED_HOSTS with grant option. Can be used with --grantfrom only.
--installonly
Just install corresponded packages. Do not configure server (except "root" user password) Conflicts with: --bootstrap, --grantfrom
Default is MySQL Server. It is also possible to use one of the following "MySQL compatible" servers:
--mariadb
MariaDB Server
--percona Percona Server
--percona-cluster Percona Cluster
--bootstrap Percona Cluster specific option to start the server in bootstrap mode
-h|--help
Print this info

The following example will install MySQL Server, and set root's random password:

# /onapp/onapp-mysql/onapp-mysql.sh

root user's connection properties to the server are at

# cat /onapp/.my.cnf 
port=3306
user=root
password=PASSWORD

Just run the OnApp Control Panel's installer with the following options (MYSQL_HOST - remote MySQL Server standalone IP address):

# /onapp/onapp-cp-install/onapp-cp-install.sh -m MYSQL_HOST -p PASSWORD --mysql-sock

It is also possible to use the remote MySQL Server for the Zabbix Server. To do so, run Zabbix's installer with the following options (MYSQL_HOST - remote MySQL Server standalone IP address):

# /onapp/onapp-zabbix/onapp-zabbix.sh --mysqlhost=MYSQL_HOST --mysqlpasswd='PASSWORD'

It is required to grant access to the MySQL Server from outside if it is going to be used remotely: for example by OnApp Control Panel, or Zabbix Server. To do so, the mysql installer should be called with --grantfrom option:

 # /onapp/onapp-mysql/onapp-mysql.sh --grantfrom='CP_HOST,ZABBIX_HOST'

where, the CP_HOST and ZABBIX_HOST are Control Panel and Zabbix Server IP addresses (separated with comma).


To install other MySQL compatible standalone databases:

MariaDB Server

  • for OnApp < 6.3:

    # /onapp/onapp-mysql/onapp-mysql.sh --mariadb
  • ForOnApp >= 6.3:

    • CentOS 6.x:

      # /onapp/onapp-mysql/onapp-mysql.sh --mariadb
    • CentOS 7.x:

      # /onapp/onapp-mysql/onapp-mysql.sh --mariadb-custom

Percona Server

# /onapp/onapp-mysql/onapp-mysql.sh --percona


    • Percona Cluster

      # /onapp/onapp-mysql/onapp-mysql.sh --percona-cluster --grantfrom='WSREP_NODE_INCOMING_IP' --bootstrap

      where, the WSREP_NODE_INCOMING_IP - IP address at which the node accepts client connections. --bootstrap is useful when installing the first node of the Percona Cluster.