MySQL Forums
Forum List  »  PHP

unable to connect to mysql on localhost
Posted by: Patrick van Zandbeek
Date: November 12, 2006 04:54AM


I just installed Apache2, php5 and mysql5 on win xp pro. Everything works fine, php works nicely and mysql shows up in phpinfo().
Connecting to mysql from the console works fine too, however when I try to do


$link = mysql_connect('localhost','root', 'my_password');


I get an error saying: Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\Apache2\htdocs\mysql.php on line 3.

Anything wrong with my connection attempt, I use the same password I use when logging into MySql via the console??

I also tried downloading and installing the latest mysql connector files but that didn't solve it either.


Edited 1 time(s). Last edit at 11/12/2006 04:55AM by Patrick van Zandbeek.

Options: ReplyQuote

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.