473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

mysql_connect cannot connect localhost

3 New Member
After I updated php from 5.3.0 to 5.3.2,
mysql_connect cannot connect localhost but 127.0.0.1.
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
5 2655
Markus
6,050 Recognized Expert Expert
What is the contents of your hosts file?
May 9 '10 #2
FalconIA
3 New Member
@Markus
127.0.0.1 localhost
May 9 '10 #3
Markus
6,050 Recognized Expert Expert
That's unusual. Nothing comes to mind. I'd file a bug report.
May 9 '10 #4
FalconIA
3 New Member
Post here:
http://bugs.php.net/bug.php?id=51759
May 9 '10 #5
chathura86
227 New Member
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)

Regards
May 9 '10 #6

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

Similar topics

0
by: Jack Smith | last post by:
Hello, I have PHP 4.3.1.1 running on Windows 2000 Server with IIS 5. This connects to an MS SQL 7 server running on a seperate NT4 box. Recently, this SQL7 Server had SQL7 Service Pack 4...
2
by: Krista | last post by:
Hi, I hope you guys can help me out~~~ when I run it localhost/config.php, it cannot display any message such as connect successfully or failed. Do u guys have any idea? config.php <html>...
4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
2
by: Hari Om | last post by:
Cannot connect as Internal Hello, I am using IBM AIX 5.1L box for Oracle 9.2.0.1. I cannot connect as internal to my DB INstance - wonder why? Here is what is do:...
6
by: Jeff Sandler | last post by:
I have a database I created in mySQL. I've been entering data every day into the database using a Java application that I wrote. The database and the Java program are on the same Win 98 SE...
0
by: John McCarthy | last post by:
Started Visual Studio Net -2003 and got the message that it cannot make a connection to LocalHost Rebooted IIS IIS is running and can ping 127.0.0.1 but VSN still cannot connect to LocalHost...
5
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql...
2
by: zMisc | last post by:
I am using VB.NET 1.1 and cannot connect to a MySQL (v5) database. I've done the following: 1) Create a DSN for MyODBC. 2) Connect using: Driver=MySQL ODBC 3.51 Driver; Server=localhost; Data...
3
by: Vino | last post by:
Dear All, I'm running my .net on win xp . When i open a new ASP.NET application, i get an error saying that - Cannot connect to local host on port 80. reasons : localhost access may be denied. ...
1
by: rubeel | last post by:
I cannot seem to connect to this Instance locally which was i able to in the past. I can connect to the instance from out side. The instance is running and the DBs in the instance are available and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.