December 1, 2004

MySql >= 4.1 Client does not support authentication protocol...

Home

If you upgrade your MySql server to >= 4.1 you might get the following error:

Client does not support authentication protocol requested by server; consider upgrading MySQL client

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.

Run mysql and login as root:
mysql -u root -p
Then, paste the following command, editing as necessary, to change the password of the user to the old format.
UPDATE mysql.USER
SET password=OLD_PASSWORD('somepassword')
WHERE USER='someuser'
AND host='somehost';
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.

See http://dev.mysql.com/doc/mysql/en/Password_hashing.html for more technical information on this issue.

Share
Previous Post
Next Post

Related Posts

101 Comments

Comment December 30th 2004 by Harry Litzroth
Wonderfull. This article solved a problem I had in a clear and concise manner. Thank you.
Comment January 5th 2005 by Jean-Marc Liotier
Thank you ! That is exactly the information I needed.
Comment January 8th 2005 by Steve
This was perfect, id tried other methods of making the auth. backward compatible which didnt help, this saved me MUCH time :)
Comment March 19th 2005 by anonymous
YOU ROCK! back up and working again....wheww...
Comment March 22nd 2005 by anonymous
perferct dude this solved my 3 hours of headach
Comment April 11th 2005 by dem
Thank You Very Much! Saved me a million reboots!
Comment May 10th 2005 by madhu
In my.ini file in the mySQL directory (C:\Program Files\MySQL\MySQL Server 4.1\my.ini), add the following line after [mysqld] old_passwords
Comment May 16th 2005 by anonymous
Thanks! This worked: mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Comment May 20th 2005 by Nick
Thanks heaps , I had been spending hours trying to find out why I couldn't authenticate.
Comment May 23rd 2005 by anonymous
thanks! i wasted a good part of yesterday until i found this article.
Comment May 24th 2005 by anonymous
thanx a lot! took me a day. If only i found this site a day ago :)
Comment May 29th 2005 by anonymous
thanks dear,i solved my problem thru this soltion.
Comment June 15th 2005 by anonymous
This change should be indicated in big bold letters everywhere. Thanks!
Comment June 18th 2005 by anonymous
great! this was really helpful!
Comment June 24th 2005 by JShiva
Thank you
Comment June 26th 2005 by anonymous
After upgrade MySQL, just wondering why some websites can connect but other website cant connect. those both running on the same sever with the same mysql version.
Comment June 28th 2005 by anonymous
super *****
Comment July 5th 2005 by anonymous
you just make my day - thank you
Comment July 8th 2005 by new software intern
WOWWW!!! That was awesome instructions. I have spent a good 3 hours wondering what went wrong and reinstalling MySQL multiplt times. This is a great article
Comment July 18th 2005 by anonymous
Merci beaucoup! vous avez sauvez mon weekend !!!!
Comment August 6th 2005 by anonymous
These instructions helped me tremendously. So clear and to the point. You are bookmarked, my friend.
Comment August 9th 2005 by tdsan@snmp3.com
yes, this helped alot. I used this syntax as well: use mysql; update user set password=old_password('password') where user='mysql@localhost'; flush privileges; And it accomplished the same thing
Comment August 11th 2005 by RP2005
Your GREAT that was cool.
Comment August 14th 2005 by anonymous
hey thankss !!! this solved my big problem... bijay :-)
Comment August 19th 2005 by MAMOUN
you saved my back from being kicked ;), from the buttom of my heart, THANK YOU !
Comment August 26th 2005 by Megan Allinson
thanks, this was great and it got me up and running very quickly! awesome :)
Comment August 28th 2005 by Ajay
that was a helpful hint in solving the problem...
Comment September 27th 2005 by Chandi
WOW!! you made my day... Thank you so much Chandi
Comment October 6th 2005 by Nitallica
Saved once again. Thank you! :)
Comment November 24th 2005 by Marvels
I have spent ages trying to find a solution to this problem. Thank you very much.
Comment December 30th 2005 by
Thankd dude!!! This wiorked in a flash! EBM
Comment February 6th 2006 by Thom
That's it. Thanks a very, very lot!
Comment February 10th 2006 by Tania
WOW! I have been working on this problem for 3 days. I tried many other fixes to no avail, but this was sheer genius. I am up and running again. Woohoo!
Comment March 4th 2006 by
This is a very very very good sol.... i spent lot of time to find it out ---- you just save my time abtcom.com.au
Comment March 9th 2006 by sakib
you simply rock my man!!!!
Comment March 23rd 2006 by anonymous
mysql is running on windows 2003 and this solution doesn't work for me ! :(
Comment April 12th 2006 by anonymous
worked sweet for my guys.. update mysql.user set password = old_password(password); this sets all users passwords to the old password hash format. thanks
Comment April 16th 2006 by anonymous
senks !!!
Comment April 19th 2006 by maxalera
musim uznat, fakt po pici riesenie.
Comment May 18th 2006 by anonymous
Wounderful...simply wounderful
Comment May 30th 2006 by newbie kid.
I'm such a newbie, can you tell me step by step how to solve this problem? which program do I use to do all of this? thanks alot.
Comment July 22nd 2006 by Dean Smith
Many Many thanks for publishing this fix
Comment July 31st 2006 by anonymous
cool you hot the right spot
Comment August 13th 2006 by anonymous
People have said and I'll say it again.. thanks a million, this saved and incredible amount of time and I hope it works for everyone else
Comment September 1st 2006 by Paul
I thought I will need to uninstall mysql v5.0 and go back to the old version. But I'm so lucky that I found this article. Thank you very much!!!!
Comment September 1st 2006 by jason
You da man.
Comment September 10th 2006 by anonymous
Didn't work for me, i still get the same error but im looking into it
Comment October 1st 2006 by bolter99
Thanks a lot!
Comment October 11th 2006 by lawrence(LTCK)
Thanks you! your code is very useful & help me a lot ... thanks ya.....
Comment October 12th 2006 by anonymous
thanks. This article was really useful.
Comment October 24th 2006 by Bob
This was amazing advace. Worked Great. If i ever meet you I'll buy ya a beer. Thanks man
Comment October 29th 2006 by Rod
Godsend!
Comment November 6th 2006 by yongfook
praise be to baby jesus. I thought my problems were wayyyyy more complicated than this but this article solved the issue in about 20 secs.
Comment November 8th 2006 by Elsa
Thanks so much! U save my few hours
Comment November 21st 2006 by librarygeek
Great article! perfect solution to my problem! Thanks!
Comment November 25th 2006 by anonymous
It was taking me hours to fix this! I luvv you!
Comment January 9th 2007 by Elf
Beautiful, thankyou so, so much - I have spent hours on this...
Comment January 17th 2007 by Josh
Very nice. Worked like a charm.
Comment January 19th 2007 by mike
thats very nice tips! lucky i found your article. that save a lot of my time to fix my problem. www.ozphonecard.com.au
Comment January 20th 2007 by dsfdsf
Thanks dude u saved my lot of time....my ass has been saved because of u
Comment January 31st 2007 by anonymous
Perfect...thanks !
Comment February 5th 2007 by anonymous
TODAY IS A GREAT DAY ....with this guide. Thanks so much.
Comment February 9th 2007 by chandu
GREAT JOB, Thank you
Comment February 25th 2007 by anonymous
Your solution gave me a solution right to the point! Thanks a lot !!!!!!!!!!!!!
Comment March 5th 2007 by anonymous
How do i do this in phpmyadmin. Where do i go to paste that query?
Comment March 19th 2007 by anonymous
server hosted mysql (godaddy) and phpmyadmin access no my.ini file. how would you update it
Comment March 20th 2007 by anonymous
yeah. it works GREAT. and for those who is still wondering, use the mysql command line client.. and type in the code. Nope, i dont think so u can do it thru phpmyadmin. gud luck. thanks a zillion anyways. imrnze -rahsiawebsite.com
Comment March 29th 2007 by Michael
Thanks a ton man. Wordpress was totally croaking on me while trying to install and this fixed it. http://javathehutt.blogspot.com
Comment May 2nd 2007 by dcn
THANKYOU. you saved me from a headache! <3
Comment June 12th 2007 by DOA
3 years later and this article is still helping people... gotta love the internet
Comment June 12th 2007 by P.S.
Thanks a lot
Comment August 13th 2007 by mangi
Thank you very much. It worked and solved my problem
Comment August 19th 2007 by naveen
thanks very much sir, you have resolved my big issue,
Comment August 20th 2007 by Sam
Thanks, this really works......
Comment August 28th 2007 by Angus
along with half the planet - thanks v much :)
Comment September 21st 2007 by anonymous
it helped me too.. cooooooool
Comment October 15th 2007 by Pissed off
Trying to set up OSCOMMERCE software on GO DADDY server is worst then pulling teeth, I am using PHPMyAdmin that is provided by GD and pasting all this info that seems to work for you guys and Shit happens. When i go to the install page of OSCommerce still getting the same message : Client does not support authentication protocol requested by server; consider upgrading MySQL client If this was such a big fucking deal 2 years ago why are we still jumping through hoops 2 years later. I just want this crappy webpage to work. GD guy told me obout this http://help.godaddy.com/article.php?article_id=216&topic_id=102 still did nothhing,
Comment October 15th 2007 by sssssssss
SET PASSWORD = OLD_PASSWORD('TYPE_PASSWORD_HERE'); use this above line only for GoDaddy Server when using their phpMyAdmin curtesy of Doug http://www.virtu-software.com/ask-doug/QandA.asp?q=67
Comment October 17th 2007 by simmo
me too me too me too - this has been bugging me for days as I had to downgrade to php4/mysql4 from php5/mysql5 to have the same dev env as the customer's live env. Now it works again. Thank you
Comment May 3rd 2008 by Nerry
Nice article.
Comment May 24th 2008 by Joey
Thank You!
Comment July 21st 2008 by Jaguar4u
Thank you very much sssssssss That was really great help
Comment September 10th 2008 by probate valuation london
VERY INTERESTING! thanks so mutch
Comment November 19th 2008 by coving
Very interesting and useful tips, so many helpful informations include in this article! Thanks for good items! This looks good! Excellent SITE.
Comment November 25th 2008 by Kevin
OH MYY GOD THANKS SOOO MUCH FOR THIS!!!! this is what i've been looking for, i've now got a working Apache/PHP/MySQL setup again thanks sooo much!
Comment November 26th 2008 by energy certificate
Thanks for this article, it's great. So great that we've made it 'sticky' on The Webmaster Forums. Now we don't have to repeat ourselves, just send people to this article!
Comment November 28th 2008 by zaza
thank you and thank you this article was very useful
Comment November 29th 2008 by kinotakara
That's perfect summary, very valuable for my next job of doing SEO friendly urls through htaccess. Thank you.
Comment December 7th 2008 by fasial
wow...just great...i had installed mysql php etc. almost ten times but useless...done as u suggested and it is perfectly OK now...Thanks buddy. GOD with you.
Comment December 24th 2008 by Amit Hasson
Dude, you are the man. Thank you !!!
Comment January 2nd 2009 by anonymous
gr8 man... luv .. -patel
Comment February 25th 2009 by ceiling roses
Thank you !!!
Comment March 7th 2009 by pozycjonowanie stron
Thank you !!!
Comment March 30th 2009 by anonymous
great!!!!!!!!!!!!!!! thank its worked for me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Comment April 17th 2009 by anonymous
thanks Heaps.
Comment May 31st 2009 by anonymous
i have a problem to use my internet explora,when i try to open an page eg like google i get HTTP510 NOT IMPLIMENTED,ple i need help
Comment February 15th 2010 by Hiral Amodia
Absolutely a great article. Very useful indeed. Lots of thanks to the author and site.
Comment March 4th 2010 by Thanks
I have a PHP 5 with an old version of MySQL Server. But, I also have old PHP 4 servers looking at the same MySQL Server. The old works fine but the PHP 5 gives me the error. Can I use this and not mess up my PHP 4 boxes?
Comment March 25th 2010 by Pat Collins
You have saved me hours of frustration THANKS
Comment March 24th 2012 by
This article is STILL helping people in 2012! Thank you
Comment April 6th 2012 by Sindhuja
THANK YOU for the excellent article.
No html tags. URLs will be automatically linked. Click CAPTCHA image for new one.
Name
Email
CAPTCHA
CAPTCHA*