473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

[MySQL] Client does not support authentication protocol

Hi

I just upgraded from MySQL 4.0.something to 4.1.1 (alpha).

When I try to connect to MySQL in a PHP script, I get the following error:

"mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in file.php on line
130"

I have not changed anything in my PHP configuration. I can connect to
MySQL with the user/password used in PHP from the command line (with
mysql.exe).

This is with Windows XP Pro and PHP 4.3.3.

Thanks.

Jul 17 '05 #1
2 7926
>I just upgraded from MySQL 4.0.something to 4.1.1 (alpha).

Did you set new passwords using MySQL 4.1.1?
When I try to connect to MySQL in a PHP script, I get the following error:

"mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in file.php on line
130"

I have not changed anything in my PHP configuration. I can connect to
MySQL with the user/password used in PHP from the command line (with
mysql.exe).


If you created new passwords using MySQL 4.1.1, then unless you
started the server with some option like "--old-passwords", the
account you are trying to connect to CANNOT be accessed by clients
older than 4.1.1 (maybe 4.1.0).

If you kept the same mysql database (the user/privileges database)
when you upgraded, it should still work. What does
"use mysql; select length(password) from user;"
return? 16 is an old-style password. 41 is a new one.
45 is some bastard version used only in 4.1.0, I think.

See the MySQL 4.1.1 manual for details on this.

Gordon L. Burditt
Jul 17 '05 #2
Gordon Burditt wrote:
I just upgraded from MySQL 4.0.something to 4.1.1 (alpha). Did you set new passwords using MySQL 4.1.1?

(yes)
When I try to connect to MySQL in a PHP script, I get the following error:

"mysql_connect(): Client does not support authentication protocol
requested by server; consider upgrading MySQL client in file.php on line
130"

I have not changed anything in my PHP configuration. I can connect to
MySQL with the user/password used in PHP from the command line (with
mysql.exe).


If you created new passwords using MySQL 4.1.1, then unless you
started the server with some option like "--old-passwords", the
account you are trying to connect to CANNOT be accessed by clients
older than 4.1.1 (maybe 4.1.0).

If you kept the same mysql database (the user/privileges database)
when you upgraded, it should still work. What does
"use mysql; select length(password) from user;"
return? 16 is an old-style password. 41 is a new one.


That's it! It returns 41. I had no idea the passwords had changed. So,
is there any way to update the client binairies used by PHP (the
libmySQL.dll file)? Or can I make PHP use my own mysql client binairies
that are in my MySQL folder?

If not, I will keep the old format, but how do I keep the same database?
When I installed the new version of MySQL (in a different directory) I
renamed the new (almost empty) data folder, and copied my old data
folder there instead, but mysqld-nt wouldn't start...
See the MySQL 4.1.1 manual for details on this.


Yes, I just read
<http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Password _hashing>

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ME | last post by:
Just thought I would post a solution (temporary at best, but a solution at least.) for all those using PostNuke who have upgraded MySql to 4.1. I have had problems with PostNuke logging into MySql...
2
by: Marcel | last post by:
Hi, I'm trying to set up a connection to MySQL on my home network. MySQL seems to be working all right, I've created accounts, databases and tables, etc. PHP-version 4.3.9, and according to...
1
by: Thomas | last post by:
Hallo. Habe auf einem SeSE 9.1 Server due neue MySQL 4.1.11 und den dazugehörigen client installiert. #: mysql -V mysql Ver 14.7 Distrib 4.1.11, for pc-linux-gnu (i686) Soweit so gut der...
5
by: Carlo Tambuatco | last post by:
I have set up MySQL on my home computer, and I am writing a PHP enabled web site to run queries on this database. I have created a database called 'weather' on mysql that I want to access via my...
11
by: AnhTai | last post by:
Hi all, I've just installed MySQL 5.0 on my sun box (runing Solaris 10, install from blastwave). This is my first time with MySQL so I don't have any exp with it. I have some troubles as: -...
1
by: Lennie De Villiers | last post by:
Hi, I'm running PHP 4.4.2 and mySQL on MS Windows XP Home Edition in IIS 6.0. When I try to connect to mySQL from PHP I get the following error message: Warning: mysql_connect(): Client does...
7
by: Paul | last post by:
I recently installed php 4.4.4 using windows binaries on Windows XP Pro. I also installed MySQL 4.1. I usually use Pear DB but I tried MDB2 and it worked fine until a client uses a different...
1
nirmalsingh
by: nirmalsingh | last post by:
hi my coding is <?php /* You should never post secure details like IP address, username and password on a public forum Removed for security Banfa Admin */
11
by: Robin S. | last post by:
I've used phpinfo() to confirm settings for mySQL on our host server, and it's not returning accurate info. phpinfo() returns a mySQL client API version of 3.23.54 (uselss for me), where as a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.