php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63386 mysqli_connect_error may not include username
Submitted: 2012-10-29 16:15 UTC Modified: 2013-01-30 16:14 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: mark at invisionpower dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.4.8 OS: OS X 10.8.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mark at invisionpower dot com
New email:
PHP Version: OS:

 

 [2012-10-29 16:15 UTC] mark at invisionpower dot com
Description:
------------
If attempting to connect to a database using the MySQL Improved Extension using a 
username but a blank password, and that user does not exist, the error message 
does not specify the attempted username.

See attached test script and expected/actual output.

Test script:
---------------
$mysqli = new mysqli( 'localhost', 'foo', '', 'dbname' );
echo $mysqli->connect_error;

Expected result:
----------------
Access denied for user 'foo'@'localhost' to database 'dbname'

Actual result:
--------------
Access denied for user ''@'localhost' to database 'dbname'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-30 16:14 UTC] uw@php.net
-Status: Open +Status: Not a bug
 [2013-01-30 16:14 UTC] uw@php.net
This is not API related. This message comes from the server and is shown to you "as-is". If you don't like it, please file a bug at bugs.mysql.com requesting the server to improve its error message.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC