Adding a Secondary MySQL Server

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)

 

  1. Install MySQL on the remote MySQL server if it’s not already installed
  2. Log in to WHM on the web server
  3. Go to Home > SQL Services
    1. This can be located quickly by searching for “sql” in the search bar
  4. Select Manage MySQL® Profiles

 

Showing the Manage MySQL Profiles location in WHM

 

  1. Click the Add Profile button

 

Showing the Add Profile button in WHM

 

  1. Enter the Profile Name
  2. Select the Configuration Method that you’d like to use
    1. Automatically create a MySQL superuser via SSH
    2. Manually enter an existing MySQL superuser’s credentials
      1. Note: This guide uses the Manual settings option
  3. Enter the Host (IP or Hostname)
  4. Enter the MySQL port that is being used on the remote MySQL server
  5. Enter the Username to access the database
  6. Enter the Password to access the database
  7. Click Save

 

Showing the Manage MySQL Profiles form in WHM

 

  1. With the Profile added you can validate its settings to ensure that the connection is working
  2. Once you’ve confirmed the settings are working you can Activate the profile

 

Showing the Activate and Validate options for the Manage MySQL Profiles section in WHM

 

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:

 

 

(This should return the Hostname if that is working or just the IP address if the Hostname is not working)

 

In Linux

 

 

 

 

 


Share:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.