Connect to online MySQL from localhost
Posted: Sat May 08, 2010 11:15 am
I have recently looked at utilizing the MySQL aspects on my webserver, and have come across this rather annoying problem - when I try to connect from my localhost testing server, I get this error;
Is there another command I need to add to get it to connect to an online server? Is it my firewall / ports interfering? Will I have egg on my face tomorrow for a blatant error?
I am using the server Byethost; I don't know if it makes a difference.
...however, from my proper server it connects straight away. I have looked around, and cannot find any mention of this problem anywhere. The syntax I am using is the standard:Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'sql313.byethost17.com' (10060)
Code: Select all
<?php
mysql_connect("sql313.byethost17.com","username", "password") or die(mysql_error());
?>I am using the server Byethost; I don't know if it makes a difference.