Yesterday’s Thoughts

October 4, 2005

mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

If you receive this error message, the answer to your question is here. Don’t go anywhere else.

After wading through substantial non-sense, Pat Hayzlett points out the answer here.

The problem in a nut shell is that mySQL 4.1 changed their password hashing and now store the passwords of database users in 40 chars instead of 16 as formerly. A number of clients cannot handle these wider passwords, including recent versions of php.

This is a public service announcement for the desperate. Normally Google is fairly effective at pointing out the solutions for very specific problems such as this, but it took a while for me to wade through the dross. If you are having this problem, follow the links. In the comments section at dev.mysql.com are instructions for modifying your php installation.

5 Comment(s)

  1. Paul | Nov 29, 2005 | Reply

    Thanks! This was very helpful!

  2. tincanman | Dec 28, 2005 | Reply

    Useful solution. I read the MySQL page just before coming here otherwise I’d be bowed down in effusive thank yous. It’s also a trap if you’re stuck developing in VC6 and are trying to bludgeon the MySQL++ library into your source code.

  3. Benjamin Juang | Jan 2, 2006 | Reply

    Thank you!

  4. BC | Mar 13, 2006 | Reply

    Excellent entry! This was so much more helpful that the 20000 other hits I got from google that didn’t help solve my problem!

  5. Sudar | Mar 19, 2006 | Reply

    Hi Ray,

    I was breaking my head for the past two days because of this error. I was trying to set up both phpMyAdmin and WordPress in my local system and was getting this error. I tried to change so many things and at last made it work after reading ur post through Google.

    Thank you very much.

    –Sudar

Sorry, comments for this entry are closed at this time.