By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

mysql_connect cannot connect localhost

P: 3
After I updated php from 5.3.0 to 5.3.2,
mysql_connect cannot connect localhost but
It shows:
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in ........

And drivers\etc\hosts seems good.

Is there anyone knows what happened?
May 9 '10 #1

✓ answered by FalconIA

Share this Question
Share on Google+
5 Replies

Expert 5K+
P: 6,050
What is the contents of your hosts file?
May 9 '10 #2

P: 3
@Markus localhost
May 9 '10 #3

Expert 5K+
P: 6,050
That's unusual. Nothing comes to mind. I'd file a bug report.
May 9 '10 #4

P: 227
i got the same kind of problem once (when i got a pc with fresh vista installation), the problem was vista did not properly resolve the host file. i did not found any proper solution either, anyway check about this issue also if you did not find any good solution. (could be ipv6 not sure)

May 9 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.