Edit report at http://bugs.php.net/bug.php?id=52434&edit=1

 ID:                 52434
 User updated by:    anthon dot pang at gmail dot com
 Reported by:        anthon dot pang at gmail dot com
 Summary:            mysqlnd: host cannot be "localhost" when connecting
                     to tcp port
 Status:             Bogus
 Type:               Bug
 Package:            MySQL related
 Operating System:   Ubuntu 10.04
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

This doesn't have anything to do with the hosts file or DNS resolution.



mysqlnd (rightly or wrongly) specially interprets "localhost" to mean a
local 

socket, to mimic some of the behavior of MySQL command-line utilities.


Previous Comments:
------------------------------------------------------------------------
[2010-09-17 03:50:57] neweracracker at gmail dot com

# localhost name resolution is handled within DNS itself.

#       127.0.0.1       localhost

#       ::1             localhost



Its disabled :)

Still no result hmm.



I blame Microsoft for this. lol

------------------------------------------------------------------------
[2010-09-16 23:30:01] paj...@php.net

There are dozen of reports about that on Windows and it is unrelated to
this problem.



A work around for the windows issue will be present in 5.3.4, in the
meantime you can disable ::1 in your windows' host file.

------------------------------------------------------------------------
[2010-09-16 23:01:03] neweracracker at gmail dot com

Hello.



I am able to reproduce this issue with:



Windows 7 build 7600 (Ultimate Edition) x86

PHP Version 5.3.3 MSVC6

mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $ 

MySQL 5.1.50



Steps to reproduce:

1. Download phpmyadmin

2. Extract on html/www/public_html (or similar)

3. Try to connect to mysql (example: login)

4. It won't work, stop php

5. Edit config.inc.php and change localhost to 127.0.0.1

6. No more errors. I guess this needs a fix

------------------------------------------------------------------------
[2010-07-25 19:00:49] anthon dot pang at gmail dot com

Ok.  I'll open a Documentation bug for this compat buster.

------------------------------------------------------------------------
[2010-07-25 18:33:43] johan...@php.net

The patch won't be added as then "localhost" has two meanings - one time
meaning "use the unixdomain socket in the default location" and one time
actually "resolve localhost and use TCP" as it is taught in many places
that "localhost" in MySQL has the first meaning we keep it there.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=52434


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52434&edit=1

Reply via email to