MySQL连接报错: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

MySQL连接报错: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

解决方法:

--进入你的数据库
use your_db; 

--修改密码认证方式
ALTER USER root@'%' IDENTIFIED WITH mysql_native_password BY '123456';
 
ALTER USER root@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
 
-- 刷新权限
FLUSH PRIVILEGES;

 

posted @ 2024-08-24 23:14  台友涛  阅读(45)  评论(0)    收藏  举报