Using a MySQL Database Remotely with cPanel

If you have external contributors to your website or your database resides on a different server, it makes sense to use remote database connections from your cPanel. Here’s how you can go about it:

  1. Pick up the IP address for the server from which you intend to establish the remote connection. http://whatismyipaddress.com/should help you find this IP address.
  2. Login to your account on cPanel, look for ‘Databases’, and then ‘Remote MySQL’.

  1. Clicking on it will bring you to a new page with a ‘Host’ field where you can enter the IP address (or host name) we identified in the beginning, and add it by selecting ‘Add Host’. If you want to grant database access to, say, all IP addresses starting with 167.45.0, you can use the ‘%’ character, by just entering 167.45.0.%.

  1. Popular software for configuring your remote MySQL include MySQL Workbench (https://www.mysql.com/products/workbench/) or Navicat (https://www.navicat.com/en/products/navicat-for-mysql). For this purpose, you’ll need your hostname, the name of your database, the credentials for the database, the port no. 3306, and if needed, the connection method should be chosen as TCP/IP.

If you’d like to remove database access that is no longer needed, just navigate back to the ‘Remote MySQL’ feature and find the host in question, then click ‘Delete’ next to its name, and confirm it with the ‘Remove Access Host’ button.

If you enjoyed this article, then you’ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! Check out our services.