For cPanel & WHM 11.44
(Home >> SQL Services >> Setup Remote MySQL Server)
This feature allows you to place your MySQL databases on a remote cPanel & WHM server that runs MySQL. A separate server for MySQL can be useful for busy servers or servers with large databases. You can offload MySQL-related work to the remote MySQL server.
This feature does not automatically transfer your MySQL data. Instead, it configures the remote server to work with your MySQL setup. After you configure the remote server, you will need to manually transfer your existing MySQL data, but any new databases that you create will reside on the remote MySQL server.
- Do not confuse this feature with the ability to allow access to a MySQL database from a remote server. To configure that option, use the Additional MySQL Access Hosts interface in WHM (Home >> SQL Services >> Additional MySQL Access Hosts).
- Each remote MySQL server works best when it corresponds to a single cPanel server configuration. While it is possible to use a single remote MySQL server for multiple cPanel servers, we do not recommend this configuration.
- Before you set up a remote MySQL server, be certain that the
openssh-clientspackage is installed on your server. You will not be able to set up a Remote MySQL Server if this package is not installed.
Install openssh-clients package
To determine whether the
openssh-clients package is installed on your server, run the following command:
If the package is installed, the output will resemble the following:
openssh-clients package is not installed, the output will resemble the following example:
To install the
openssh-clients package, run the following command as the
Make certain that the local server's hostname resolves
Before you set up a remote MySQL server, ensure that the remote server resolves your local server's IP address to its hostname. You also need to ensure that the local server resolves your remote server's IP address to its hostname.
To confirm this, run the
host command on the remote server through the command line.
This command resolves the hostname from the IP address.
If you have not set up a reverse DNS entry for the local server, edit
/etc/hosts on the remote MySQL server and add an entry for your local server, with the IP address and hostname. This will perform the hostname lookup manually, rather than through the DNS.
Set up the remote MySQL server
To set up a remote MySQL server, perform the following steps:
- If it is not already installed on your remote server, install MySQL.
- Add the MySQL user's
rootpassword for the
mysqluser to the
- Review the displayed information, and enter the appropriate data:
Select whether to log in as
rootor with a specific username.
You must specify FQDNs in lowercase letters.
- If you selected User under Login:
- Enter the remote account's username in the Username text box.
- Enter the remote account's password in the Password text box.
- If you choose Password, enter the password for the account in the Password text box.
- If you choose SSH Public Key, select the key that you wish to use during authentication.
- If the SSH Public Key is encrypted, enter the SSH Key Passphrase.
- If you selected su for the Root Escalation Method, enter the
rootpassword in the Root Password text box.
Terminate remote MySQL service
If your server currently uses a remote MySQL server, and you wish to return to a local MySQL server, perform the following steps:
localhostin the Remote server address text box.
- Click Setup MySQL.