introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.
-->

MYSQL Error 2002 in Easyphp5.3.2 but NOT in 5.2.10 on Windows 7



Posted by: Vincenzo
April 08, 2010 10:48PM
Hi!
In the subject my problem:
The 5.2.10 work ok, but the 5.3.2 not...

SO Windows 7
ERROR: Warning: mysql_connect() [function.mysql-connect]: [2002]
Posted by: Amour
April 09, 2010 07:31AM
phpMyAdmin is working ?
Posted by: Vincenzo
April 09, 2010 08:03PM
Yes
Posted by: Amour
April 10, 2010 03:05PM
So, maybe an error with your script ?

Can we see it ?
Posted by: Vincenzo
April 10, 2010 04:39PM
Is a simple mysql_connect and work with other veriosn of EasyPhp an on production server
Posted by: Amour
April 10, 2010 09:18PM
So, I don't understand... can we see your code please ?
April 14, 2010 05:00PM
servekur
April 15, 2010 07:26PM
Apparently pb with IpV6 use 127.0.0.1 instead.

this should be handled within php or mysql

maybe a default config pb
Posted by: B Thomas
May 05, 2010 02:57PM
This is due to a change to the way PHP communicates with MySQL in PHP 5.3.

You will either need to use 127.0.0.1 to connect to your database or edit:
C:\Windows\System32\drivers\etc\hosts

And remove the hash (#) in front of:
# 127.0.0.1 localhost

Save the file, then it should work.

Hope this helps.
Posted by: Milton Mori
May 19, 2010 05:55AM
EASYPHP 5x.x = Vista = Problems
Posted by: jmnduc
June 02, 2010 01:23PM
change in you .php file $host = 'localhost'; by $host = '127.0.0.1';
Posted by: Adrian Maire
October 23, 2010 05:39PM
THX a lot for solution: i have changed "localhost" to "127.0.0.1" in the conexion line and it work..
Posted by: samiha
January 11, 2012 08:15PM
my problem is mysql can't connect