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

December 1, 2004

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.

Related Posts

102 Comments

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

Add Comment

No login required and anonymous if you prefer.
Comment:
No html tags. URLs will be automatically linked. Spam protection is in place for email address. Click CAPTCHA image for new one.
Name (optional):
Email (optional):
CAPTCHA: