Home > Database > Mysql Tutorial > body text

What to do if Authentication plugin appears in MySQL database

藏色散人
Release: 2020-05-17 17:09:48
forward
5090 people have browsed it

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';   #更新一下用户的密码
Copy after login

1. Refresh permissions

FLUSH PRIVILEGES; #刷新权限
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template