note 55167 added to function.mysql-connect
| From: | AnthonyBoyd at osu1 dot php dot net | Date: | Tue, 26 Jul 2005 22:53:29 +0000 |
| Subject: | note 55167 added to function.mysql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92515@lists.php.net to get a copy of this message | ||
Some versions of PHP do not support the new longer passwords used by MySQL 4.1 and later. This will
cause the error message that 2raptor mentioned a few posts prior to this one:
"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.
-Tony
----
Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55167
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55167&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55167&report=yes
Search -- http://master.php.net/manage/user-notes.php