php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25462 mysql_connect() password not compatible with MySQL 4.1.x stronger passwords
Submitted: 2003-09-09 19:59 UTC Modified: 2003-09-09 20:00 UTC
From: sitbon at pdx dot edu Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.3.2 OS: RedHat 9/MySQL 4.1.0
Private report: No CVE-ID: None
 [2003-09-09 19:59 UTC] sitbon at pdx dot edu
Description:
------------
When PHP attempts to connect to MySQL, the password hash is calculated based on MySQL v3.x, but the newer versions (4.1.x) use a stronger password hash, and so the connection is refused on grounds of a bad password, regardless of correctness. Blank passwords still work, and running MySQL with --old-passwords works, but when changing the password with a MySQL 4.1.x client, the hash is again incompatible with PHP. The --old-passwords flag only affects the PASSWORD() command, and apparently the MySQL client does not use it to set the hash.

Reproduce code:
---------------
n/a

Expected result:
----------------
n/a

Actual result:
--------------
n/a

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-09 20:00 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You should be using mysqli in 5.0 for MySQL 4.1+
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Aug 01 12:00:03 2025 UTC