I can't connect to my MySQL database which is held by a hosting provider.
I've set up accounts correctly in cPanel so I can connect to database when I run my php code from phpadmin server.
But now I want to access it from a database tool on Mac rather than phpmyadmin. I've added my IP (both IP and DNS name..) to "Remote Database Access Hosts" in cPanel.
I've tried to connect both from PHP and directly. I always get:
MySQL Said: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (4)
Use the following configuration settings for connecting to your database:
I have tried this:
- Host name = (use the server IP address)
- Database name =(cpanelUsername_databaseName)
- Database username = (cpanelUsername_databaseUsername)
- Database password = (the password you entered for that database user)
- MySQL Connection Port = 3306