From:             spam04 at pornel dot net
Operating system: Mac OS X 10.5.5
PHP version:      5.3CVS-2008-11-01 (snap)
PHP Bug Type:     PDO related
Bug description:  PDO+MySQL 5.1 gets empty username wrong if password is empty

Description:
------------
When connecting to MySQL 5.1 (mysql-5.1.29-rc-osx10.5-x86_64 to be exact)
with empty password in PDO::__construct(), MySQL receives empty username.

Seems like bug #43493 (I've tried on snapshot from 10 minutes ago, so it's
not fixed in CVS, at least not for MySQL)

Actual result:
--------------
new PDO("mysql:dbname=database","username",'');

results in:

SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database
'database'

Note that MySQL got empty username.

However:

$dest_db = new PDO("mysql:dbname=database","username",'password');

gives expected error:

SQLSTATE[28000] [1045] Access denied for user 'username'@'localhost'
(using password: YES)



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

Reply via email to