|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
|||
|
|||
|
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 ![]() |
|
#5
|
||||
|
||||
|
Does the user you're using to access the database have permissions to access the database?
|
|
#6
|
|||
|
|||
|
Quote:
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 |
|
#7
|
||||
|
||||
|
Quote:
It seems to work, but... Can you explain what these two lines do? Last edited by JBottero : December 19th, 2004 at 12:24 AM. |
|
#8
|
||||
|
||||
|
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+ |
|
#9
|
||||
|
||||
|
Quote:
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. |
|
#10
|
||||
|
||||
|
Quote:
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. ![]() |
|
#11
|
||||
|
||||
|
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. |
|
#12
|
|||
|
|||
|
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?
|
|
#13
|
||
|
|