Home >Database >Mysql Tutorial >What to do if Authentication plugin appears in MySQL database
What should I do if the Authentication plugin appears in the MySQL database?
When connecting to the MySQL database, the error Authentication plugin 'caching_sha2_password' cannot be loaded will appear. The solution is as follows:
1. Log in to mysql
2. Modify the account Password encryption rules and update user passwords
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码
1. Refresh permissions
FLUSH PRIVILEGES; #刷新权限
Run again and you will find that there is no such error.
Recommended: "mysql tutorial"
The above is the detailed content of What to do if Authentication plugin appears in MySQL database. For more information, please follow other related articles on the PHP Chinese website!