Home > Archive > PHP Programming > February 2005 > Error: Client does not support authentication protocol
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Error: Client does not support authentication protocol
|
|
| Martin 2005-02-13, 3:57 pm |
| I don't know if this is a PHP problem or a MySQL problem - hopefully,
someone here can give me a clue.
I am getting the subject error when I try to connect to MySQL from a
PHP page.
$conn = mysql_connect( $domain, $user, $password );
I'm using PHP 5.0.1 and MySQL Server: 4.1.9; Client: 5.0.0
Running on Windows XP (IIS, of course)
According to the MySQL Reference Manual, this problem occurs only when
using client programs older than 4.1.1. I'm not sure what they mean by
"client programs". Is PHP the "client" in my situation?
Help?
| |
| Martin 2005-02-13, 3:57 pm |
| On Sun, 13 Feb 2005 08:30:05 -0700, Martin <martinvalley@comcast.net>
wrote:
>I don't know if this is a PHP problem or a MySQL problem - hopefully,
>someone here can give me a clue.
>
>I am getting the subject error when I try to connect to MySQL from a
>PHP page.
>
>$conn = mysql_connect( $domain, $user, $password );
>
>I'm using PHP 5.0.1 and MySQL Server: 4.1.9; Client: 5.0.0
>Running on Windows XP (IIS, of course)
>
>According to the MySQL Reference Manual, this problem occurs only when
>using client programs older than 4.1.1. I'm not sure what they mean by
>"client programs". Is PHP the "client" in my situation?
>
>Help?
While looking at the "PHPIno.php" page, I found, in the "MySQL"
section, this entry: Client API Version 3.23.57
I assume this is what is out of date. What is it referring to, a DLL
somewhere? How do I update it? Is this a PHP thing or MySQL?
As noted above, the MySQL Administrator shows the "Client" at version
5.0.0.
| |
| Andy Hassall 2005-02-13, 3:57 pm |
| On Sun, 13 Feb 2005 09:09:10 -0700, Martin <martinvalley@comcast.net> wrote:
>On Sun, 13 Feb 2005 08:30:05 -0700, Martin <martinvalley@comcast.net>
>wrote:
>
>
>While looking at the "PHPIno.php" page, I found, in the "MySQL"
>section, this entry: Client API Version 3.23.57
>
>I assume this is what is out of date. What is it referring to, a DLL
>somewhere? How do I update it? Is this a PHP thing or MySQL?
PHP comes bundled with a MySQL client library. Older versions of PHP
(including 5.0.1) came with 3.23.57, as a lowest common denominator that'll
worked with most versions of MySQL; up until they changed the password hashing
stuff.
The php_mysql.dll interface between PHP and MySQL, as built in the binary
distribution for Windows, only worked with this older version, since it linked
against a function that doesn't exist in newer MySQLs.
I believe this has been addressed in 5.0.3, which bundles a newer MySQL client
(4.1.7), or you can use your own if you have that earlier in the PATH.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
| |
| Martin 2005-02-13, 3:58 pm |
| On Sun, 13 Feb 2005 16:32:55 +0000, Andy Hassall <andy@andyh.co.uk>
wrote:
>On Sun, 13 Feb 2005 09:09:10 -0700, Martin <martinvalley@comcast.net> wrote:
>
>
> PHP comes bundled with a MySQL client library. Older versions of PHP
>(including 5.0.1) came with 3.23.57, as a lowest common denominator that'll
>worked with most versions of MySQL; up until they changed the password hashing
>stuff.
>
> The php_mysql.dll interface between PHP and MySQL, as built in the binary
>distribution for Windows, only worked with this older version, since it linked
>against a function that doesn't exist in newer MySQLs.
>
> I believe this has been addressed in 5.0.3, which bundles a newer MySQL client
>(4.1.7), or you can use your own if you have that earlier in the PATH.
Andy - thanks.
I'll look into updating to 5.0.3
In the meantime, I got this working. I read a couple of things on
MySQL about setting an ini file value: "old_passwords", but I couldn't
seem to get it to have any effect.
What they didn't say was that, after setting this value, the passwords
themselves need to be re-entered.
More significantly, though, and what I had to learn the hard way, was
that "old_passwords" is apparently NOT the correct value to put in the
ini file! While trying to figure all this out, I noticed that
MySQLAdmin allows one to set a checkbox that adds/removes this value
from the ini file. But, it writes the value as "old-passwords" (notice
the dash instead of the underscore). When I did this, it started
working!
I don't see "old-passwords" anywhere in the MySQL documentation - only
"old_passwords". Granted, I didn't do an exhaustive search but
still...
| |
| dormston 2005-02-21, 8:56 am |
| Martin
I'm trying to work through this same problem. Frustrating isn't it.
Sadly I find that when I set the use old passwords option in MySQL
Administrator is still doesn't help. But I'm interested in your
comment about re-entering the passwords. Where did you do that? In
the php.ini file or in MySQL Administrator.
Feel like I might just be getting a little closer to the answer here
so would appreciate your help.
Thx
Debbie
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
| |
| Frank East 2005-02-28, 8:56 pm |
| On 2005-02-13 10:30:05 -0500, Martin <martinvalley@comcast.net> said:
> I don't know if this is a PHP problem or a MySQL problem - hopefully,
> someone here can give me a clue.
>
> I am getting the subject error when I try to connect to MySQL from a
> PHP page.
> $conn = mysql_connect( $domain, $user, $password );
>
> I'm using PHP 5.0.1 and MySQL Server: 4.1.9; Client: 5.0.0 Running on
> Windows XP (IIS, of course)
>
> According to the MySQL Reference Manual, this problem occurs only when
> using client programs older than 4.1.1. I'm not sure what they mean by
> "client programs". Is PHP the "client" in my situation?
> Help?
from the command line under mysql you can simply change to password to
be stored in the old format using a variant of the set password =
OLD_PASSWORD('somepassword');
or you can begin coding with the mysqli stuff...
|
|
|
|
|