Gary Williams
10-25-2009, 12:23 PM
Hi All,
I have recently transfered a MySQL database from one server to another. When I try to connect to my MySQL database (with my normal asp connection string), I get the following error message:
"Client does not support authentication protocol requested by server; consider upgrading MySQL client"
It looks like my original servers version of MySQL is older than the current one. Looking around the net, I have found the following explanation:
"This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server."
As my new server is a virtual one, I cannot use the following three solutions. How can I modify my existing database to solve this problem?
Regards
Gary
======================
Solution #1:
Run mysql and login as root:
[ICODE] mysql -u root -p [ICODE]
Then, paste the following command, editing as necessary, to change the password of the user to the old format.
[CODE]
UPDATE mysql.user
SET password=OLD_PASSWORD('somepassword')
WHERE user='someuser'
AND host='somehost';
[CODE]
After you have set the passwords to the old format, flush the tables.
flush privileges;
Then exit the mysql client with "quit" and you are set.
======================
Solution #2:
Change the password algorithm to the old one.
to do so, open the SQL command line.
type your password.
the prompt says MYSQL>
then type in this
[CODE]
MYSQL> set password for
-> some_user@localhost = OLD_PASSWORD('some_password');
[CODE]
replace some_user and some_password with the username and the password you want.
======================
Solution #3
If you are using PHPMyAdmin, just go the the "Privileges" tab.
Edit the user containing username and host you want to use with. In the "Change Password" box below, you can choose whether using password or no. The solution is in there: Choose "MySQL 4.0 Compatible" and "Go".
=====================
I have recently transfered a MySQL database from one server to another. When I try to connect to my MySQL database (with my normal asp connection string), I get the following error message:
"Client does not support authentication protocol requested by server; consider upgrading MySQL client"
It looks like my original servers version of MySQL is older than the current one. Looking around the net, I have found the following explanation:
"This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server."
As my new server is a virtual one, I cannot use the following three solutions. How can I modify my existing database to solve this problem?
Regards
Gary
======================
Solution #1:
Run mysql and login as root:
[ICODE] mysql -u root -p [ICODE]
Then, paste the following command, editing as necessary, to change the password of the user to the old format.
[CODE]
UPDATE mysql.user
SET password=OLD_PASSWORD('somepassword')
WHERE user='someuser'
AND host='somehost';
[CODE]
After you have set the passwords to the old format, flush the tables.
flush privileges;
Then exit the mysql client with "quit" and you are set.
======================
Solution #2:
Change the password algorithm to the old one.
to do so, open the SQL command line.
type your password.
the prompt says MYSQL>
then type in this
[CODE]
MYSQL> set password for
-> some_user@localhost = OLD_PASSWORD('some_password');
[CODE]
replace some_user and some_password with the username and the password you want.
======================
Solution #3
If you are using PHPMyAdmin, just go the the "Privileges" tab.
Edit the user containing username and host you want to use with. In the "Change Password" box below, you can choose whether using password or no. The solution is in there: Choose "MySQL 4.0 Compatible" and "Go".
=====================