Knowledgebase
Knowledgebase
Remote MySQL Connection in cPanel
Posted by Will Kruss on 12 August 2016 11:00 AM

Enable Remote MySQL Connections in cPanel | Liquid Web Knowledge Base

Remote MySQL connections are disabled by default in cPanel servers because they are considered a potential security threat. 

However, you can enable them for a specific IP address by following the below instructions.

Open MySQL in your firewall

First go to WHM -> Plugins -> ConfigServer

Then click on 'Firewall Configuration'

Scroll down until you find the TCP_IN and TCP_OUT port lists, and add 3306 to both of those lists.

Enabling Remote MySQL in the WHM Interface

In WHM go to SQL Services -> Additional MySQL Access Hosts and add your IP address then click 'Save'. If you aren't sure of your IP open a new browser window and navigate to: http://www.whatismyip.com and it will tell you.

Now that the remote connection has been activated in the WHM each cPanel account that you want to access remotely also needs to have remote access enabled.

Enabling Remote MySQL in the cPanel Interface

Log in to the domain’s cPanel interface and find the databases section.

In the Databases section find the link/button labeled Remote MySQL and click on it.

Now add your IP address and click 'Add Host'. This must be your IP address (the same IP you specified in the WHM MySQL Access Hosts list)

You should now be able to make a connection from the IP address you have specified.

 

(0 vote(s))
Helpful
Not helpful