How to use a remote MySQL server for SolusVM Master?
Warning: SolusVM doesn't support remote MySQL connections, use the following workaround at your own risk:
The existing MySQL credentials are required to establish a connection. Find them in the file
/usr/local/solusvm/includes/solusvm.conf on SolusVM Master Node. The file contains the string like this:
# cat /usr/local/solusvm/includes/solusvm.conf
The string consists of 5 parts divided by `:`, with the following meaning of parts:
CONFIG_TEXT: <DATABASENAME>:<USER>:<PASSWORD>:<HOST>:<the key is the last entry>
<HOST> variable is
localhost by default.
To establish a remote MySQL connection:
- Login to the remote MySQL server.
- Create a new user with the same name and with the same password as in
- Create a SolusVM database backup
- Copy the backup to the server where MySQL is running with the help of rsync, scp or similar tools.
- Create the database with the same name and import the database dump.
# mysql -u username -p database_name < solusvm2019-09-17_08.28.sql
- Make sure that you can connect to the remote MySQL server from the Master Node via CLI:
# /usr/bin/mysql --user=USER --password=PASSWORD -h 203.0.113.2 DATABASENAME
Note: Replace 203.0.113.2 is the actual IP of a remote MySQL server.