By default, cPanel servers don't let you connect to MySQL from outside your network for security reasons. But there may be times when you need to let people access your MySQL databases from outside the network.
This guide shows you how to use the domain-level cPanel interface to allow remote MySQL connections.
Go to your domain's cPanel and sign in.
You can usually get to it by going to:
http://domainname.com/cpanelFind the Databases section on the main cPanel page.
Click on Remote Database Access under Databases.

Type in the hostname or IP address from which you want to allow remote MySQL access.

To save the changes, click the Save button.
Click the Delete button next to the entry you want to delete if you need to remove an existing host or IP address.
You can either go back to the main cPanel page or log out when you're done.
For security reasons, we might stop incoming MySQL connections to keep the mysqld service safe from attacks.
Please get in touch with our support team if you still can't connect after adding your IP address. They will add your IP to the server whitelist.
You can allow certain hosts or IP addresses to connect to your MySQL service securely by following the steps above to enable remote MySQL connections through the cPanel interface.
Our support team is always ready to help if you need more help.