Menu

#79 Will not authenticate with MySQL 4.1+

open
nobody
None
5
2005-10-24
2005-10-24
No

My SQL uses some sort of longer authentication string
for passwords so popper fails with a authentication
problem when you use the newest MySQL. Had to do this
for Gallery2 web app too (another project).

Fix:
Some versions of PHP do not support the new longer
passwords used by MySQL 4.1 and later. This will cause
the error message:

"Client does not support authentication protocol
requested by server; consider upgrading MySQL client"

However, for ease of use, let's review the two fixes
right here.

First, you should upgrade to a newer PHP that supports
the longer MySQL passwords. However, I don't even know
if the PHP 4.x series has been upgraded to handle this
yet. So for my installation, I took a different
approach -- I downgraded MySQL's passwords to the "old"
shorter encryption. Here's how:

SET PASSWORD FOR 'some_user'@'some_host' =
OLD_PASSWORD('newpwd');

As a real-world example, I used this query:

SET PASSWORD FOR 'testaccount'@'%' =
OLD_PASSWORD('secret');

Suddenly, PHP could use the testaccount to access the
database. Yay.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB