ID:               46457
 User updated by:  spam04 at pornel dot net
-Summary:          PDO+MySQL 5.1 gets empty username wrong if password is
                   empty
 Reported By:      spam04 at pornel dot net
 Status:           Open
 Bug Type:         PDO related
 Operating System: Mac OS X 10.5.5
 PHP Version:      5.3CVS-2008-11-01 (snap)
 New Comment:

(fixed summary)


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

[2008-11-01 18:10:18] spam04 at pornel dot net

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 this bug report at http://bugs.php.net/?id=46457&edit=1

Reply via email to