mysql 8.0 Error The server requested authentication method unknown to the client Solution
- 2021-12-11 19:19:18
- OfStack
After mysql has installed the latest version 8.0. 11 and created a user and authorized it, the authorized user is prompted to connect to the database
The server requested authentication method unknown to the client
After consulting some related information, it is found that the new version of mysql account password unlocking mechanism is not 1
Solution:
Delete the created users and authorizations,
Locate the mysql configuration file and join default_authentication_plugin=mysql_native_passwordChange to the original authentication method, and then create a new user and authorize it
Or
mysql -uroot -p
use mysql;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ' Your password ';
The above is the solution to this mistake. If you have a better solution, you can leave a message on WeChat official account on this site. Thank you for your support on this site.