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

December 2, 2004
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.

Related Posts

100 Comments

Comment December 30, 2004 by Harry Litzroth
Wonderfull. This article solved a problem I had in a clear and concise manner. Thank you.
Comment January 5, 2005 by Jean-Marc Liotier
Thank you ! That is exactly the information I needed.
Comment January 9, 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 20, 2005 by anonymous
YOU ROCK! back up and working again....wheww...
Comment March 22, 2005 by anonymous
perferct dude this solved my 3 hours of headach
Comment April 11, 2005 by dem
Thank You Very Much! Saved me a million reboots!
Comment May 10, 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 16, 2005 by anonymous
Thanks! This worked: mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Comment May 21, 2005 by Nick
Thanks heaps , I had been spending hours trying to find out why I couldn't authenticate.
Comment May 23, 2005 by anonymous
thanks! i wasted a good part of yesterday until i found this article.
Comment May 25, 2005 by anonymous
thanx a lot! took me a day. If only i found this site a day ago :)
Comment May 29, 2005 by anonymous
thanks dear,i solved my problem thru this soltion.
Comment June 16, 2005 by anonymous
This change should be indicated in big bold letters everywhere. Thanks!
Comment June 18, 2005 by anonymous
great! this was really helpful!
Comment June 24, 2005 by JShiva
Thank you
Comment June 26, 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 29, 2005 by anonymous
super *****
Comment July 5, 2005 by anonymous
you just make my day - thank you
Comment July 8, 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 18, 2005 by anonymous
Merci beaucoup! vous avez sauvez mon weekend !!!!
Comment August 7, 2005 by anonymous
These instructions helped me tremendously. So clear and to the point. You are bookmarked, my friend.
Comment August 9, 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 11, 2005 by RP2005
Your GREAT that was cool.
Comment August 14, 2005 by anonymous
hey thankss !!! this solved my big problem... bijay :-)
Comment August 19, 2005 by MAMOUN
you saved my back from being kicked ;), from the buttom of my heart, THANK YOU !
Comment August 26, 2005 by Megan Allinson
thanks, this was great and it got me up and running very quickly! awesome :)
Comment August 29, 2005 by Ajay
that was a helpful hint in solving the problem...
Comment September 27, 2005 by Chandi
WOW!! you made my day... Thank you so much Chandi
Comment October 7, 2005 by Nitallica
Saved once again. Thank you! :)
Comment November 24, 2005 by Marvels
I have spent ages trying to find a solution to this problem. Thank you very much.
Comment December 30, 2005 by
Thankd dude!!! This wiorked in a flash! EBM
Comment February 7, 2006 by Thom
That's it. Thanks a very, very lot!
Comment February 10, 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 4, 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 9, 2006 by sakib
you simply rock my man!!!!
Comment March 23, 2006 by anonymous
mysql is running on windows 2003 and this solution doesn't work for me ! :(
Comment April 12, 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 16, 2006 by anonymous
senks !!!
Comment April 19, 2006 by maxalera
musim uznat, fakt po pici riesenie.
Comment May 18, 2006 by anonymous
Wounderful...simply wounderful
Comment May 30, 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 22, 2006 by Dean Smith
Many Many thanks for publishing this fix
Comment July 31, 2006 by anonymous
cool you hot the right spot
Comment August 14, 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 1, 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 2, 2006 by jason
You da man.
Comment September 11, 2006 by anonymous
Didn't work for me, i still get the same error but im looking into it
Comment October 1, 2006 by bolter99
Thanks a lot!
Comment October 12, 2006 by lawrence(LTCK)
Thanks you! your code is very useful & help me a lot ... thanks ya.....
Comment October 12, 2006 by anonymous
thanks. This article was really useful.
Comment October 24, 2006 by Bob
This was amazing advace. Worked Great. If i ever meet you I'll buy ya a beer. Thanks man
Comment October 30, 2006 by Rod
Godsend!
Comment November 7, 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 8, 2006 by Elsa
Thanks so much! U save my few hours
Comment November 22, 2006 by librarygeek
Great article! perfect solution to my problem! Thanks!
Comment November 25, 2006 by anonymous
It was taking me hours to fix this! I luvv you!
Comment January 9, 2007 by Elf
Beautiful, thankyou so, so much - I have spent hours on this...
Comment January 18, 2007 by Josh
Very nice. Worked like a charm.
Comment January 20, 2007 by dsfdsf
Thanks dude u saved my lot of time....my ass has been saved because of u
Comment February 1, 2007 by anonymous
Perfect...thanks !
Comment February 6, 2007 by anonymous
TODAY IS A GREAT DAY ....with this guide. Thanks so much.
Comment February 9, 2007 by chandu
GREAT JOB, Thank you
Comment February 26, 2007 by anonymous
Your solution gave me a solution right to the point! Thanks a lot !!!!!!!!!!!!!
Comment March 5, 2007 by anonymous
How do i do this in phpmyadmin. Where do i go to paste that query?
Comment March 20, 2007 by anonymous
server hosted mysql (godaddy) and phpmyadmin access no my.ini file. how would you update it
Comment March 20, 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 29, 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 2, 2007 by dcn
THANKYOU. you saved me from a headache! <3
Comment June 12, 2007 by DOA
3 years later and this article is still helping people... gotta love the internet
Comment June 12, 2007 by P.S.
Thanks a lot
Comment August 14, 2007 by mangi
Thank you very much. It worked and solved my problem
Comment August 19, 2007 by naveen
thanks very much sir, you have resolved my big issue,
Comment August 20, 2007 by Sam
Thanks, this really works......
Comment August 28, 2007 by Angus
along with half the planet - thanks v much :)
Comment September 22, 2007 by anonymous
it helped me too.. cooooooool
Comment October 15, 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 15, 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 17, 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 3, 2008 by Nerry
Nice article.
Comment May 24, 2008 by Joey
Thank You!
Comment July 21, 2008 by Jaguar4u
Thank you very much sssssssss That was really great help
Comment September 10, 2008 by probate valuation london
VERY INTERESTING! thanks so mutch
Comment November 19, 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 25, 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 26, 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 29, 2008 by zaza
thank you and thank you this article was very useful
Comment November 29, 2008 by kinotakara
That's perfect summary, very valuable for my next job of doing SEO friendly urls through htaccess. Thank you.
Comment December 7, 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 24, 2008 by Amit Hasson
Dude, you are the man. Thank you !!!
Comment January 2, 2009 by anonymous
gr8 man... luv .. -patel
Comment February 25, 2009 by ceiling roses
Thank you !!!
Comment March 7, 2009 by pozycjonowanie stron
Thank you !!!
Comment March 30, 2009 by anonymous
great!!!!!!!!!!!!!!! thank its worked for me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Comment April 17, 2009 by anonymous
thanks Heaps.
Comment May 31, 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 15, 2010 by Hiral Amodia
Absolutely a great article. Very useful indeed. Lots of thanks to the author and site.
Comment March 4, 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 25, 2010 by Pat Collins
You have saved me hours of frustration THANKS
Comment March 24, 2012 by
This article is STILL helping people in 2012! Thank you
Comment April 6, 2012 by Sindhuja
THANK YOU for the excellent article.