CentOS 8.x Cloudstack 4.15 Setup Mariadb server

From Notes_Wiki

Home > CentOS > CentOS 8.x > Virtualization > Cloudstack 4.15 > Setup Mariadb server

The below steps assume Mariadb server is different then cloudstack management server. If you want to setup mariadb and management on same machine, there might be package conflict as cloudstack-management package might try to use mysql instead of mariadb. In that case use mysql instead of mariadb to get successful setup

To setup Mariadb server for using with Cloudstack 4.15 use following steps:

  1. Initialize server using CentOS 8.x Cloudstack 4.15 Initialize infrastructure server (except optional java 11 installation)
  2. Install mariadb server:
    dnf -y install mariadb-server
  3. Edit '/etc/my.cnf.d/mariadb-server.cnf' and under '[mysqld]' section paste:
    innodb_rollback_on_timeout=1
    innodb_lock_wait_timeout=600
    max_connections=350
    log-bin=mysql-bin
    binlog-format = 'ROW'
  4. Start and enable database using:
    systemctl start mariadb
    systemctl enable mariadb
  5. Run mysql_secure_installation and set root password
    mysql_secure_installation
    Ensure that for "Disallow root login remotely" answer is N (No) instead of default yes
  6. Give grant permission to root user on all databases from any remote machine:
    # mysql -u root -p
    > grant all privileges on *.* to 'root'@'%' identified by '<secret-root-password>' WITH GRANT OPTION;
    > flush privileges;
    Better option is to give this privilege only from cloudstack management server instead of using '%' (everywhere)



Home > CentOS > CentOS 8.x > Virtualization > Cloudstack 4.15 > Setup Mariadb server