MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 1st, 2004, 10:09 AM
worldhost worldhost is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Raleigh, NC
Posts: 3 worldhost User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to worldhost Send a message via MSN to worldhost Send a message via Yahoo to worldhost
Client does not support authentication protocol (was "Need Help MySQL Errors")

HI. I recently had a crash with MySQL-Max 4.0.5beta in the Windows 2000 Server inviroment. I uninstalled it completely and salvaged the DATA directories. So i decided to go ahead and upgrade the MySQL to Server 4.1.7. But now I get an error message from all my scripts that tell me the following.

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL

Can some one please assist me in fixing this matter. I am very limited in MySQL and have done hours of research trying to fix this matter. Any help with this matter would be greatly appericated.

Thanks in advance.

Richard Futrell

Reply With Quote
  #2  
Old December 1st, 2004, 01:30 PM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
MySQL changed the password hashing functions in version 4. There are two easy solutions.

Either - start the server with the --old-passwords flag.

Or: update the users password using:
SET PASSWORD = OLD_PASSWORD('secret');
SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

More Info: Old Client Error

Mods: Can we make this a sticky?

Cheers,
Simon

Last edited by SimonGreenhill : December 1st, 2004 at 01:41 PM. Reason: added more details

Reply With Quote
  #3  
Old December 1st, 2004, 01:32 PM
r937's Avatar
r937 r937 is offline
SQL Consultant
Dev Shed God 25th Plane (17000 - 17499 posts)
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,331 r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level)r937 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 5 Days 7 h 21 m 33 sec
Reputation Power: 891
Quote:
Originally Posted by SimonGreenhill
Mods: Can we make this a sticky?
done
__________________
r937.com | rudy.ca

Reply With Quote
  #4  
Old December 1st, 2004, 04:18 PM
worldhost worldhost is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Raleigh, NC
Posts: 3 worldhost User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to worldhost Send a message via MSN to worldhost Send a message via Yahoo to worldhost
Thumbs down MySQL Problems

I would like to thank you for your quick responce. That did work for the installation of a new database. But here is my issue now. I have a backup of the DATA directory. And when I log in to the MySQL Server with MySql Control Center I am able to see all the DATABASES but I am unable to access them. I get the following errors.

Unable To Connect To Database Server.

Unable To Connect To Selected Database.


the site that I need to get back up is http://www.heavensangels01.com/password_protect/index.php

This was working with out issues before the crash. Once again any help you can provide would be most appericated.

Thanks again.
Richard Futrell

Reply With Quote
  #5  
Old December 1st, 2004, 04:50 PM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
Does the user you're using to access the database have permissions to access the database?

Reply With Quote
  #6  
Old December 2nd, 2004, 07:40 AM
worldhost worldhost is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Location: Raleigh, NC
Posts: 3 worldhost User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to worldhost Send a message via MSN to worldhost Send a message via Yahoo to worldhost
Thumbs down

Quote:
Originally Posted by SimonGreenhill
Does the user you're using to access the database have permissions to access the database?


Yes. I have tried the root user and also a user that I have created just for this account. I am stumped.

I have been trying all kinds of stuff to get this fixed. But seem to be staying in the same area.

Once again. Thanks for you help and kindness.

Richard Futrell

Reply With Quote
  #7  
Old December 19th, 2004, 12:05 AM
JBottero's Avatar
JBottero JBottero is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Trollville.
Posts: 377 JBottero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 31 m 11 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
Quote:
Originally Posted by SimonGreenhill
MySQL changed the password hashing functions in version 4. There are two easy solutions.

Either - start the server with the --old-passwords flag.

Or: update the users password using:
SET PASSWORD = OLD_PASSWORD('secret');
SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

More Info: Old Client Error

Mods: Can we make this a sticky?

Cheers,
Simon
I don't quite understand this.

It seems to work, but...

Can you explain what these two lines do?

Last edited by JBottero : December 19th, 2004 at 12:24 AM.

Reply With Quote
  #8  
Old December 19th, 2004, 02:59 AM
SimonGreenhill's Avatar
SimonGreenhill SimonGreenhill is offline
(retired)
Dev Shed God 11th Plane (10000 - 10499 posts)
 
Join Date: Dec 2003
Location: The Laboratory
Posts: 10,101 SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)SimonGreenhill User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 4925 Folding Title: Novice Folder
Time spent in forums: 3 Months 3 Weeks 5 h 49 m 4 sec
Reputation Power: 1331
Facebook
Sure.

When MySQL moved to v4.1, they changed the password hashing algorithm.

Prior to 4.1, they used a hashing algorithm which generated hashes of 16 bytes in length. This was bumped up to 41 byte SHA1 hashes in 4.1* This was done mainly for better security and to cut down the risk of password interception.

Examples:
Code:
mysql> select old_password('devshed');
+-------------------------+
| old_password('devshed') |
+-------------------------+
| 63719e490238211c        |
+-------------------------+
1 row in set (0.00 sec)

mysql> select password('devshed');
+-------------------------------------------+
| password('devshed')                       |
+-------------------------------------------+
| *100603ADDBAFBFB1C375933B69B26121B77F98A5 |
+-------------------------------------------+
1 row in set (0.14 sec)


The problem is that a number of programs / applications haven't been updated to deal with this hashing algorithm, so what we're telling MySQL to do is to use the old 16-byte hash (SET PASSWORD = OLD_PASSWORD('devshed') ), or to assume that all the passwords are in the 16 byte hash form (eg: "mysqld --old-passwords &").

Lots of info here

* Note - MySQL v4.1.0 used 45 byte hashes. Why? God knows. This was dropped back to 41 bytes in 4.1.1+
Comments on this post
eightballfreek disagrees: Very helpful.
busmaster agrees: ^^ oops, wrong button. not that it matters to simon

Reply With Quote
  #9  
Old December 19th, 2004, 01:09 PM
JBottero's Avatar
JBottero JBottero is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Trollville.
Posts: 377 JBottero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 31 m 11 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
Quote:
Originally Posted by SimonGreenhill
Sure.

When MySQL moved to v4.1, they changed the password hashing algorithm.

Prior to 4.1, they used a hashing algorithm which generated hashes of 16 bytes in length. This was bumped up to 41 byte SHA1 hashes in 4.1* This was done mainly for better security and to cut down the risk of password interception.

Examples:
Code:
  mysql> select old_password('devshed');
  +-------------------------+
  | old_password('devshed') |
  +-------------------------+
  | 63719e490238211c        |
  +-------------------------+
  1 row in set (0.00 sec)
  
  mysql> select password('devshed');
  +-------------------------------------------+
  | password('devshed')                       |
  +-------------------------------------------+
  | *100603ADDBAFBFB1C375933B69B26121B77F98A5 |
  +-------------------------------------------+
  1 row in set (0.14 sec)
  


The problem is that a number of programs / applications haven't been updated to deal with this hashing algorithm, so what we're telling MySQL to do is to use the old 16-byte hash (SET PASSWORD = OLD_PASSWORD('devshed') ), or to assume that all the passwords are in the 16 byte hash form (eg: "mysqld --old-passwords &").

Lots of info here

* Note - MySQL v4.1.0 used 45 byte hashes. Why? God knows. This was dropped back to 41 bytes in 4.1.1+
Hmmm. So, down the line when most apps use the newer system, can this modification be reversed? And, is there a way to allow the use of both?

Also, after I found that phpMyAdmin didn't like my latest MySQL install, I checked php itself by useing a simple mysql_connect in a test script and got the same error, so this tells me that PHP v. 4.3.2 itself does not support the new hash? Well, that sucks! I haddn't planned to migrate to php v. 5 untill after its "shake-down" period...

This gets me thinking about the various php (and other scripting languages) database abstraction layers out there (PEAR, ADOBD, etc...). Hmmmm.

Last edited by JBottero : December 19th, 2004 at 01:12 PM.

Reply With Quote
  #10  
Old January 3rd, 2005, 07:56 AM
eightballfreek's Avatar
eightballfreek eightballfreek is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Covent Garden, London UK
Posts: 45 eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 9 h 42 m
Reputation Power: 6
Thumbs up Massively helpful, thanks!

Quote:
Originally Posted by SimonGreenhill
MySQL changed the password hashing functions in version 4. There are two easy solutions.


Simon,

This was very helpful, thanks. I'm using the latest version of Apache (2.0.52) with PHP v4.3.10 and MySQL 4.1, and your password-changing fix worked perfectly.

Thanks very much, sir.


Reply With Quote
  #11  
Old January 3rd, 2005, 08:54 AM
eightballfreek's Avatar
eightballfreek eightballfreek is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Covent Garden, London UK
Posts: 45 eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level)eightballfreek User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 9 h 42 m
Reputation Power: 6
ODBC Logging-In Problems

Actually, I've noticed something else. Once applying this fix, I can't log in using the default credentials - I get the error:

Code:
Access denied for user 'ODBC'@'localhost' (using password: NO)


I can log in by running MYSQL.EXE with the following parameters:

Code:
mysql> mysql.exe --user=root --password=mypass


But when I try the same fix for the user ODBC, MySQL returns:

Code:
ERROR 1133: Can't find any matching row in the user table


Anyone have any ideas? All I want to do is run the command line prompt without having to constantly type in --user and --password.

Reply With Quote
  #12  
Old January 8th, 2005, 06:31 PM
monkey123 monkey123 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 monkey123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 sec
Reputation Power: 0
I get this same error but i don't know how to fix it in command line I use DBA central for MySQL how do i fix it using this?

Reply With Quote
  #13  
Old January 23rd, 2005, 10:50 AM
JimmyGosling's Avatar
JimmyGosling JimmyGosling is offline