by Kevin Schroeder | 9:32 am

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.

Comments

Faizal

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?

Sep 15.2016 | 04:28 pm

Kevin Schroeder

You need to execute them on the MySQL CLI.

Sep 17.2016 | 07:09 am

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.