By default MySQL only accepts connections from localhost. To connect from an outside server or app:
- Log in to cPanel from your client area and open Remote MySQL.
- Enter the remote IP address (or a host name) that needs access and click Add Host.
You can find your connecting machine's IP at a site like whatismyip. Then connect using the server hostname (not localhost), port 3306, and your database user. For security, add only specific IPs rather than the wildcard %. If your host has a dynamic IP, you may need to update it when it changes. Need the server hostname? Open a ticket.