Database

The server requested authentication method unknown to the client [mysql_old_password]

I updated my server this morning, moving from Zend Server PHP 5.3 to 5.6 but when I did I got a really weird error.

The server requested authentication method unknown to the client [mysql_old_password]

I spent way too much time debugging it but it turns out that this is an incompatibility between MySQLnd and MySQL 5.5.  For the defaults, at least.  MySQLnd does not know about the mysql_old_password authentication method and so this error was being thrown.

The information I found said to update your user’s password and things should be fine.  I did, and they weren’t.  When I was updating the password it wasn’t using the new password hash for some reason.  So what I did was execute the following commands.

set session old_passwords=0;
update mysql.user set Password=PASSWORD('password') where User = 'user';
flush privileges;

For whatever reason I needed to disable old passwords on the MySQL session that I was connected on.

2 thoughts on “The server requested authentication method unknown to the client [mysql_old_password]”

  1. Hi Kevin..
    I also encountered this issue today. I’m new to this developing website thing. Just purchased my first hosting and domain. When I tried to install an AJAX shopping cart into my hosting, i got this error: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client.

    Newbie question: What do you mean you execute the command? How do you execute that?

Leave a Reply

Your email address will not be published. Required fields are marked *