#47820 [Opn->Fbk]: mysql_connect("localhost") dooesn't work

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               47820
 Updated by:       [email protected]
 Reported By:      busia at tiscali dot it
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQL related
 Operating System: Windows Vista
 PHP Version:      5.3.0RC1
 New Comment:

Try open your hosts file in:
%SystemRoot%\System32\Drivers\etc\hosts

and remove the IPv6 address (::1) or uncomment it, what your looking
for is:
::1 127.0.0.1

Remove that and it should work


Previous Comments:
------------------------------------------------------------------------

[2009-03-28 11:35:44] busia at tiscali dot it

Description:
------------
After the update from 5.2.9 to 5.3.0RC1 the command

if(!$db = mysql_connect("localhost", "root", "root")) {
	die(mysql_error()." ".mysql_errno());
}

cause mysql timeout

if I use, instead:
if(!$db = mysql_connect("127.0.0.1", "root", "root")) {
	die(mysql_error()." ".mysql_errno());
}

All works. In php 5.2.9 all worked well.

Mysql Version is 5.0.77 (installed as windows service)
PHP Version is 5.3.0RC1



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47820&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.