So, I have a problem in trying to talk to a remote MySQL server, which is on a Digital Ocean host (Ubuntu). My other host is on IPOWER, but their SQL capabilities are not so great so I wanted my PHP files on IPOWER to talk to my MySQL database on Digital Ocean.
I keep getting an error, "connection refused" however.
This is what it looks like from the IPOWER side:
mysqli_connect('$myDigitalOceanIP', '$myUserName', '$myPassword', 'database', '3306');
On the Digital Ocean side I have done the following:
Lifted the firewall and IPTables restrictions on port 3306
Created a new user in the MySQL that comports with $myUserName with Select, Insert, and Update permissions that can connect from any IP.
Flushed privileges in MySQL console and restarted the MySQL and Apache services
Confirmed that MySQL is listening on port 3306.
Edited the my.cnf file so that
bind-addressis commented out so that connections outside of the localhost can be accepted.
With all of this, I am still getting connection refused. Please throw additional suggestions my way!
Also, is there an error log I should be looking at? The Apache access and error logs yield me nothing and I couldn't find a SQL error log. Do I have to enable it somehow?