php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55558 MySQL returns incorrect error message for test
Submitted: 2011-08-31 22:06 UTC Modified: 2011-09-02 11:13 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: simon at welsh dot co dot nz Assigned:
Status: Wont fix Package: MySQL related
PHP Version: 5.4SVN-2011-08-31 (SVN) OS: Mac OS 10.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
25 + 40 = ?
Subscribe to this entry?

 
 [2011-08-31 22:06 UTC] simon at welsh dot co dot nz
Description:
------------
With MySQL 5.5.10-log (64 bit package, downloaded from mysql.com), if the user 
does not exist when connecting to the database, the error message returned is:
Access denied for user 'rootunknown_real'@'localhost' (using password: NO)
even when a password is supplied. This breaks both mysql_connect.phpt and 
mysql_pconnect.phpt in 5.4, as they are expecting the result to be (using 
password: YES).

This also happens when running mysql from the command line, so the test should 
work around it.

If the two test cases my patch changes should be testing for YES, instead of just 
an error, then change the connect/pconnect call to use $user rather than $user . 
'unkown_real'


Patches

mysql_connects_error (last revision 2011-08-31 22:07 UTC by simon at welsh dot co dot nz)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-02 11:13 UTC] uw@php.net
-Status: Open +Status: Wont fix
 [2011-09-02 11:13 UTC] uw@php.net
This is a MySQL server bug. Update to MySQL 5.5.15 and it's gone. If the test was not that strict, this MySQL server bug had never been found.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 11:03:35 2021 UTC