mySQL connection problems.

Associate
Joined
1 Jun 2007
Posts
820
I have a script which contacts a mySQL server for some data.

I have 2 servers. Different companys.

Each has a backup of the data. If one fails it contacts the other.

Now one server on Vidahost works correctly even if it fails. But the other one cant contact the Vidahost mySQL server when it fails.

This is the error:

Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'host name' (110) in test.php

Ive added the IP address to the remote mySQL connections.

I can connect to both servers from my home PC running php.

Any ideas ?
 
Last edited:
Associate
OP
Joined
1 Jun 2007
Posts
820
Nothing fancy this extracted from the file:

$dbcon=mysqli_connect($DBHOSTNAME,$DBUSERNAME,$DBPASSW,$DBDATABASE);

The script works when run from localhost and on VIdahost.

I dont have root access but I do have ssh access on the problematic server.

Not sure if they use SELinux. Will dig further.

Update:

Its Red Hat 4.1.2-52. Linux version 2.6.32
 
Last edited:
Associate
OP
Joined
1 Jun 2007
Posts
820
Yeah they are the same.

The command line mySQL doesnt even connect. I said to them support that it seems like a firewall is blocking the connection but they say they are allowing mysql connections.
 
Associate
OP
Joined
1 Jun 2007
Posts
820
Found out the problem their machine had multiple IP address which I didnt know about.

I need to allow access to the other IP address. Everything is fine now.
 
Back
Top Bottom