There is a way to enable external web servers/computers to access your MySQL database. After permitting remote host access, you can connect to your MySQL database via client applications.
To enable hosts to explore your MySQL remotely, follow these steps:
• Now you are in the home screen area of the cPanel. Locate the term Databases. While there, you will see Remote MySQL.
• After you click Remote MySQL, move to Add Access Host within the Host box. Enter the IP address of the remote server/computer you wish to grant remote access to your database. The IP will be allowed through our firewall and the relevant MySQL grants will be added to the access list.
• It is optional to add a remark in the Comment text box. The remark can be a brief description of the new remote host you are about to give access to your MySQL databases.
Lastly, click on Add Host to complete this process.
Some software can open an SSH tunnel to your MySQL database, so not requiring you to add each individual IP that needs. This is the best method if you have an IP address that changes regularly, but it also means that the connection is fully encrypted.
To do this, you will need to give the software (for example, MySQL Workbench) your cPanel username and password to establish an SSH connection to your hosting service first. You'll need the following credentials to establish an SSH tunnel for MySQL:-
SSH Username: your cPanel user
SSH Password: your cPanel password
SSH Port: 22
Database Username: a valid database user, created in cPanel
Database Password: the password corresponding to that user
Database Host: 127.0.0.1
MySQL Port: 3306
Updated 22 days ago