By default, cPanel does not allow remote MySQL connections, which is a good thing as long as you don't need to.
If you are using cPanel and want to allow a remote IP to access your MySQL databases, then you will need to whitelist that IP (Enable Remote MySQL Connections).
3. In the Host field, type in the IP address then click Add Host
Once you have added the IP address to Remote MySQL, you will be able to connect.