I have two servers, and I recently upgraded one of them. The one that has been upgraded hosts the main MySQL database.
The other server has several sites that access this database. They all worked fine when accessing the old server, but now I'm getting this error:
I haven't been able to find anything about the error code (4), so I'm at a loss.
Things I've done:
1. Made sure that I could log in to MySQL locally using the username and password on the remove server.
2. SSH'ed to the remote server and made sure that I could ping the new one.
3. Double checked that the remote server's IP was listed as an "Access Host" in cPanel.
4. Just to be safe, double checked that it's also listed as an "Access Host" in WHM.
5. Whitelisted the remote server's IP in my firewall (it wasn't blacklisted, anyway)
If it matters, I'm connecting via PHP:
I also tried using mysql_connect("example.com"...), and then tried specifying the port with mysql_connect("example.com:3306"...), but neither made any difference.
I'm sure that this is an issue of granting permission to the remote server, but where else do I need to grant it?
The other server has several sites that access this database. They all worked fine when accessing the old server, but now I'm getting this error:
Code:
Can't connect to MySQL server on '123.45.67.89' (4)
Things I've done:
1. Made sure that I could log in to MySQL locally using the username and password on the remove server.
2. SSH'ed to the remote server and made sure that I could ping the new one.
3. Double checked that the remote server's IP was listed as an "Access Host" in cPanel.
4. Just to be safe, double checked that it's also listed as an "Access Host" in WHM.
5. Whitelisted the remote server's IP in my firewall (it wasn't blacklisted, anyway)
If it matters, I'm connecting via PHP:
Code:
$user = [username];
$pass = [password];
$dbh = mysql_connect("123.45.67.89", $user, $pass, false) or die(mysql_error());
I'm sure that this is an issue of granting permission to the remote server, but where else do I need to grant it?