You may sometimes want to configure MySQL to allow external connections so that other applications or servers can connect to your server through port 3306. At Clouding, we configure MySQL in cPanel to always use local connections for security reasons. However, you can easily enable external connections if you wish.
Configure MySQL in cPanel
First, access cPanel and go to Home > Remote Mysql:
Next, fill in the "Host (% wildcard is allowed)" and "Comment (optional)" fields. In the host field, you can specify the IP address of your connection, the IP address of one of your servers, a network range or a domain.
The following image shows an example of how to allow all IP addresses:
You can see all allowed IP addresses at the bottom of the same window:
Clouding Firewall configuration
Finally, you will need to open the port in the Clouding Firewall. Log in to the Clouding Panel and, within your server, go to the Firewall tab. Add a new rule there. In IP de Origen, you can simply enter the IP address of the machine that wants to connect. Entering 0.0.0.0/0 will allow anyone to connect through port 3306: