How to allow remote MySql connection to only one IP?

There may be a case in which one of the cPanel user request you to provide access to Mysql remotely. You probably can't open MySql port 3306 on the server because that would lead to security risks. So in such case follow below steps -
 
Step 1:
Login to cPanel >> Remote Mysql >> Add remote server's IP address under Add access host >> Click Add host.

Step 2 :
Open mysql port for the remote IP address. To do this update below csf file (firewall) -

nano /etc/csf/csf.allow
tcp|in|d=3306|s=x.x.x.x (Replace x.x.x.x with remote server IP)

Now, remote IP x.x.x.x will be able to access Mysql on your server.

Was this answer helpful?

 Print this Article

Also Read

Fatal error: Class 'JCache' not found in /libraries/joomla/factory.php - Joomla Issue

After updating the Joomla, I was getting Fatal error: Class 'JCache' not found in...

How to Install or Uninstall EasyApache 4 on cPanel server?

EasyApache Software is included within your cPanel and WHM license which is very easy and useful...

How to resolve the 404 error message on the website with the temporary URL?

To access website while developing we often need to see how it looks, there is an option...

Can't find disk space in /home directory on the cPanel server.

Before transferring a website from one server to another, I checked disk space of website using...

How to disable the php mail() function on cPanel with CloudLinux?

If your server installed cPanel with CloudLinux along alt-php and you want to disable php mail()...

Powered by WHMCompleteSolution