How to use a remote MySQL server for SolusVM Master?

Applicable to:

  • SolusVM


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>

Note: a <HOST> variable is localhost by default.

To establish a remote MySQL connection:

  1. Login to the remote MySQL server.
  2. Create a new user with the same name and with the same password as in/usr/local/solusvm/includes/solusvm.conf
  3. Create a SolusVM database backup
  4. Copy the backup to the server where MySQL is running with the help of rsync, scp or similar tools.
  5. Create the database with the same name and import the database dump.

    # mysql -u username -p database_name < solusvm2019-09-17_08.28.sql

  6. 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 DATABASENAME

    Note: Replace is the actual IP of a remote MySQL server.

Articles in this section

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.