FIX ERROR – WordPress: The server requested authentication method unknown to the client [caching_sha2_password]

When installing WordPress using MySQL 8, the following error may occur:

Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]

The reason is the default authorization method.

 

Solution:

In the file "/etc/my.cnf" in the block "mysqld" add the following:

default-authentication-plugin=mysql_native_password

 

And restart the mysqld service:

systemctl restart mysqld

 

If the user has already been created using the "caching_sha2_password" method, then you need to log in to mysql and do the following:

alter user 'username'@'localhost' identified with mysql_native_password by 'password';
0 0 vote
Article Rating

Tagged: Tags

Подписаться
Уведомление о
guest
0 Comments
Inline Feedbacks
View all comments