From:             
Operating system: Windows 7 Ultimate 64bit
PHP version:      5.3.2
Package:          MySQL related
Bug Type:         Bug
Bug description:Same as bug #45150 (localhost -> 127.0.0.1)

Description:
------------
Same as bug #45150. I was not able to connect to MySQL via localhost though
PHP found the mysql extension etc.

Finally, after 20 hours work, I found a website through Google that let me
to a solution. To fix this I'll have to use "127.0.0.1" instead of
"localhost"

I'm using IIS7.5 on Windows 7 Ultimate 64bit

FastCGI (PHP 5.2.13 installer [20,929Kb] - 25 February 2010, md5:
891e3262428851ebe71d5432a97be6d5, with my own php.ini aftertouch)

MySQL 5.1.46-winx64

Using both IPv4 and IPv6

I can use localhost within MySQL command prompt, but not with PHP.

Test script:
---------------
// timeout

$host = "localhost";

$user = "root";

$password = "******";

$database = "******";

$mysql_link = mysql_connect( $host, $user, $password );



// timeout fixed

$host = "127.0.0.1";

$user = "root";

$password = "******";

$database = "******";

$mysql_link = mysql_connect( $host, $user, $password );



Expected result:
----------------
Normal connection with mysql without timeout.

Actual result:
--------------
Timeout trying to connect via mysql_connect (Error: 2002)

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51759&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51759&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51759&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51759&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51759&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51759&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51759&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51759&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51759&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51759&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51759&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51759&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51759&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51759&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51759&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51759&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51759&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51759&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51759&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51759&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51759&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51759&r=mysqlcfg

Reply via email to