Server requested authentication method unknown to the client [mysql_old_password]

I had the same error, trying to debug locally some application that connects to remote DBs. When using php < 5.3, everything worked. When using php 5.3 or greater, error shows up.

After hours spent reading and tweaking, i realized this only occurred when connecting as a certain user. All databases i use have new password length (41).

I changed the password for that user, and everything worked fine, even after changing it again to the previous value.

Hope this helps someone.


Since you did this changes to the MySQL side, your only other option is to downgrade PHP.

Other links support this:

  • StackOverflow : MySQL PHP incompatibility
  • ServerFault : mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in
  • Another Blog : http://datatables.net/forums/discussion/12188/notice-array-to-string-conversion-for-check-boxes/p1
  • I just posted an update to my answer you referred to : Connect Error (2054) - mysql_old_password issue still not solved.