For postgres can't help, but if you're trying to do remote access to a mySql database you can go into cPanel and under the databases section select remote mysql. Then add hosts/ips that you need to be able to access from.