By default, you can only access your databases via the server hosting your website. cPanel’s Remote MySQL page lets you enable database access from other locations, such as your home or another website. For security reasons we don’t allow remote connections on our shared hosting, premium and reseller hosting plans. However, we can enable the feature on our VPS and dedicated hosting plans.
The Remote MySQL page has two sections:
To access your database(s) from your home or office you first need to know your IPv4 address. You can check your IP address via findip.co.
In the below example I added the IP address 18.104.22.168. I also added a comment, which is purely for my own reference (you can leave the field blank).
Image: allowing an IP address.
Note: You can connect from another website by entering the site’s domain name instead of an IP address.
The Manage Access Hosts section lists existing IP addresses and domains. By default, only the IP address of the server is allowed. The below image also shows the office IP address I added.
Image: the office IP address is now allowed to connect to our databases.
If you need to revoke access for an IP address or domain name, simply click on the Delete link.
After allowing your IP address or domain you can connect to the database straight away. You can either use a graphical tool such as MySQL workbench, or you can connect directly from the command line.