How To Connect CloudBolt To An External MySQL Instance


This article discusses how to connect the CloudBolt server to a CloudBolt MySQL instance that lives in a separate server. While CloudBolt is typically installed as a single appliance, the individual pieces of CloudBolt can be split into different systems.  The easiest way to do this is to install 2 separate virtual appliances, then use the following steps to point the Apache front-end from one system to the MySQL database from the second system.


You need a root user to perform the steps


Step 1 Configuring the DB server

  1. Get to the mysql shell (usually 

    mysql -u root --password=Vi-gn3tt3 cloudbolt from the commandline)

  2. Type:

    GRANT ALL PRIVILEGES ON cloudbolt.* TO ‘root’@'cloudbolt_ip' IDENTIFIED BY 'Vi-gn3tt3';
    (Replacing ‘cloudbolt_ip’ with the ip address of the server you want to be able to access this database from)

  3. Close and exit from the shell

  4. Edit /etc/my.cnf and make sure the bind-address is set to the ip of the database server

  5. Restart mysqld with 

    service mysqld restart

  6. Open the iptables to give access to the mysql port:

    /sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
    Change ‘eth0’ to the appropriate value (use ifconfig to see which eth is being used)

  7. Save changes to iptables with 

    service iptables save

Step 2 Configuring the CloudBolt front-end

  1. Set up the CloudBolt server you want to be able to access the remote database

  1. From /opt/cloudbolt/ in the DATABASES section, add values for ‘HOST’ and ‘PORT’ where the host is the IP of the database server and port is 3306

  1. Restart apache with 

service httpd restart

Additional information!cloudbolt-latest-docs/setting-up-high-availability

Have more questions? Submit a request


Please sign in to leave a comment.