Troubleshooting: The server requested authentication method unknown to the client

 


The server requested authentication method unknown to the client


The cause of this is MySQL v8.0+, it changes the default method to authentication of the database. Therefore, you need to get your hand on the MySQL server to fix it.

METHOD 1. Run this query to your MySQL query editor or you can run it in CLI.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';


METHOD 2. Change MySQL server configuration to use a native password as the default method for authentication. In my case, I used laragon and it can be found C:\laragon\bin\mysql\mysql-<version>\my.ini. find the [mysqld] section and add the following line:

[mysqld]
default_authentication_plugin = mysql_native_password

Then restart MySQL server.
Previous Post Next Post

نموذج الاتصال