I have a 'test.php' on my webhost that sends the typical mysql_connect request to the database. When I access this test.php from my browser, connection is successful. I have the exact same test.php on my local box as well as EasyphpDev/Webserver. When I access test.php locally the return is: **Could not connect: No connection could be made because the target machine actively refused it. **
Test.php:
<?php
$link = mysql_connect('MyWebSite.ipagemysql.com', "databaseName","*password*");
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(blog_);
?>
For obvious reasons I substituted the first half of address etc. As I stated, test.php when accessed in it's location on my website works fine. Attempts from my local machine crap! I've checked my firewall and just to be 100%, I disabled it. Ive tryed different formats such as using remote IP instead of Domain etc, to no avail.
It seems that a connection is made however the error is [MACHINE] not [MYSQL] which indicates the response is not from MYSql correct? Thanks in advance!