It makes sense to use remote database connections from your cPanel if you have external contributors to your website or if your database is hosted on a different server. Here’s how to go about doing it:
Take note of the IP address of the server from which you plan to connect remotely. http://whatismyipaddress.com/ should be able to assist you in determining your IP address.
Look for ‘Databases’ and then ‘Remote MySQL’ in your cPanel account.
By selecting it, you will be taken to a new page with a ‘Host’ area where you can input the IP address (or host name) we found earlier and select ‘Add Host’ to add it. You can use the’percent’character to provide database access to all IP addresses beginning with 167.45.0, for example, by simply typing 167.45.0. percent.
MySQL Workbench (https://www.mysql.com/products/workbench/) and Navicat (https://www.navicat.com/en/products/navicat-for-mysql) are two popular options for setting your remote MySQL. You’ll need your hostname, the name of your database, the credentials for the database, the port number 3306, and, if necessary, TCP/IP as the connection method.
If you no longer require database access, simply return to the ‘Remote MySQL’ function and locate the host in issue, then click ‘Delete’ next to its name, then confirm using the ‘Remove Access Host’ button.