Okay guys...I'm at my wit's end with this one. Here my situation:
- I have a webserver on the East Coast.
- I have my MySQL server in Texas. They are about 1,000 miles apart, suffice to say.
The MySQL server is running on a computer with no firewall. MySQL is running on the standard port (3306 I believe). It's a basic installation.
I have a username/password combination that grants all rights (privileges) from ANY host...so it shouldn't matter from where to connection originates.
The webserver is running the latest version of IIS and has PHP correctly configured.
I have the following code on the webserver:
<?
$db = mysql_connect("my_ip_address", "*****", "*****") or die("Could not connect: " . mysql_error());
print "connected.";
mysql_close($db);
?>
Of course..."my_ip_address" is the IP address of the MySQL server, and the ***** are the correct username and password...I just do not want to post them here.
So when I load that PHP script that tries to connect to the MySQL server running 1,000 miles away, I get this:
Warning: MySQL Connection Failed: Can't connect to MySQL server on '*' (10061) in D:\test.php on line 2
Could not connect: Can't connect to MySQL server on '*' (10061)
Obviously, I blanked out my IP address again.
Now, you can see the problem. I can run scripts on that local machine (running a test copy of Apache locally) when I reference the machine as localhost. However, outside of that computer itself, nobody can connect to it, though the privileges are correct.
Does anyone have ANY idea why the MySQL server in Texas would be unreachable by the webserver on the East Coast? It seems as though the MySQL server only likes being addressed as "localhost" despite that it has been instructed to accept connections from ANY host using that same login.
This is truly frustrating.
GRUMBLE!
Thanks!