MySQL Forums
Forum List  »  MySQL Administrator

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'www.myhost.com' (10060)
Posted by: an0x eghbalz
Date: May 12, 2008 05:33PM

hi.i trying to connect my mysql data base on my host from my local host using this code:
mysql_connect("www.myhost.com", "myUser", "myPass") or die(mysql_error());
echo "db connected <br>";
mysql_select_db("myDB") or die(mysql_error());
echo "db selected <br>";
// Insert a row of information into the table "my_tag"
mysql_query("INSERT INTO my_tag
( my_row ) VALUES ( '$my_row' ) ")
or die(mysql_error());
echo "Data Inserted!";
i run this code under my wamp server on my localhost & having this error:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'www.myhost.com' (10060) in C:\wamp\www\my_page.php on line 125
Can't connect to MySQL server on 'www.myhost.com' (10060)

Options: ReplyQuote


Subject
Written By
Posted
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'www.myhost.com' (10060)
May 12, 2008 05:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.