473,569 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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 7939
>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_connec t(): 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_Da tabase_Administ ration.html#Pas sword_hashing>

Jul 17 '05 #3

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

Similar topics

0
2339
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 after upgrading to MySql 4.1. I received the message: "Client does not support authentication protocol requested by server. Consider upgrading...
2
1678
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 phpinfo() no configure command. If I execute the command: $db = mysql_connect ('localhost', 'root', 'xxxxxx') or die ("Unable to
1
7619
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 Server läuft auch. Nach dem ich die Datenbanken der Vorgängerversion 4.0.x in das
5
2669
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 website. I have also created a user with a password (this isn't the real one, but I'll use this to illustrate my point) User: carlotam...
11
20518
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: - I set password for root account via this command: # mysql -h atlantis -u root mysql
1
1769
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 not support authentication protocol requested by server; consider upgrading MySQL client in D:\Work\LIVE WORK\Gafachi Clone\www\dbconnect.php on...
7
2490
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 version so I reverted back to straigh PHP mysql function calls. I use this code: $link = mysql_connect('localhost', 'username', 'password'); if...
1
1470
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
2138
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 SELECT VERSION() query on the mySQL database returns version 5.0.27 (exactly what we need). I think there's something wrong with the mySQL library in...
0
7619
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.