Authentication method unknown to the client

In my case this error was caused by upgrading MariaDB / MySQL to a way never version (5.4.2811.1.2-GA) which by default uses different authentication method (GSSAPI plugin) than my previous version was using (native MySQL authentication).

Solution in my case was to login to phpMyAdmin and change authentication method for all users.

A magic?

Like that:

When adding new user you also have to make sure that you are using the same auth method:

I don’t know how, but managed to login to phpMyAdmin even with the above problem. My application died completely while PMA was only complaining about wrong authentication method, but was working normally even so. Don’t ask me how it is possible — it’s pure magic.

No magic?

If there is not enough magic in your case and you can’t login to phpMyAdmin, you may try any other client to execute the following SQL statement:

ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';

Or for creating new user:

CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';

If you cannot execute this through any of your MySQL / MariaDB clients, because all of them refuse to login you then you may try to save the above SQL statement to some resetuser.sql file and run:

mysqld.exe --no-defaults --bind-address= --bootstrap --standalone <resetuser.sql

in bin folder of your MySQL / MariaDB installation.

Leave a Reply