I'm trying to remotely access a mysql database on server 111.111.111.111 from server 222.222.222.222.
I've logged into the cPanel account on server 111.111.111.111 and added 222.222.222.222 to the Remote Database Access Hosts. (As well as %.domain.com where domain .com.is the actual domain on 222.222.222.222 that will be accessing the database)
I'm using the same username/password that I use to access the database locally on 111.111.111.111. (without any problems)
But when It try to access the database from the remote server via PHP using -
mysql_connect('111.111.111.111', 'username', 'password');
I get the error -
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 111.111.111.111 (4)
I know the database is running fine and I've read every post I can find on this subject, but I can't get it to work.
I'd appreciate any suggestions.
I've logged into the cPanel account on server 111.111.111.111 and added 222.222.222.222 to the Remote Database Access Hosts. (As well as %.domain.com where domain .com.is the actual domain on 222.222.222.222 that will be accessing the database)
I'm using the same username/password that I use to access the database locally on 111.111.111.111. (without any problems)
But when It try to access the database from the remote server via PHP using -
mysql_connect('111.111.111.111', 'username', 'password');
I get the error -
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 111.111.111.111 (4)
I know the database is running fine and I've read every post I can find on this subject, but I can't get it to work.
I'd appreciate any suggestions.