How do I setup a separate server for MySQL in WHM?
You can setup a server to handle MySQL, which can help if your site(s) get a lot of traffic or are running big databases. (See below for important notes)
- Install MySQL on the remote MySQL server if it’s not already installed
- Log in to WHM on the web server
- Go to Home > SQL Services
- This can be located quickly by searching for “sql” in the search bar
- Select Manage MySQL® Profiles
- Click the Add Profile button
- Enter the Profile Name
- Select the Configuration Method that you’d like to use
- Automatically create a MySQL superuser via SSH
- Manually enter an existing MySQL superuser’s credentials
- Note: This guide uses the Manual settings option
- Enter the Host (IP or Hostname)
- Enter the MySQL port that is being used on the remote MySQL server
- Enter the Username to access the database
- Enter the Password to access the database
- Click Save
- With the Profile added you can validate its settings to ensure that the connection is working
- Once you’ve confirmed the settings are working you can Activate the profile
Important notes:
- Your MySQL data is not automatically transferred, this has to be done manually
- Databases and data from this point on will run from this new server
- This is not the same as allowing access to a MySQL database from another server
- It’s best to setup a server for each cPanel
- Make sure the remote server resolves the local IP and hostname before attempting to set it up
How do I know if my remote MySQL server resolves the local IP and hostname?
Before you start setting up a remote MySQL Server, ensure that you’re able to reach the remote servers IP address and HOSTNAME. This test will need to be performed on both the Remote Server (MySQL) and your local server.
From the Command Line in Windows:
c:>ping [HOSTNAME or IP]
(This should return the Hostname if that is working or just the IP address if the Hostname is not working)
In Linux
#ping [HOSTNAME or IP]