I have allowed remote connections to mysql. I can successully connect from the console of another machine.
I have some php files on another server but I cant connect to the same mysql db from php.
This is the way I’m doing it:
mysql_pconnect("theipaddress","username","password")
or die("Unable to connect to db server");
Now bear in mind I am using the same creds which I successfully used in the console. I even tried putting the port after the ip but no joy.
Any ideas?
You must have a user in MySQL who is allowed to connect from % (any host) (see manual for details).
Have you selinux installed? Maybe selinux is not allowing apache to make remote connections? If yes, type: