Mysql登录错误:ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded
MySQL登录错误 ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded
MySQL版本
Server version: 8.0.22 MySQL Community Server - GPL
Docker启动MySQL之后,创建对应的用户,使用MariaDB客户端登录,报错如下:
# mysql -u bbsgo -h 0.0.0.0 -P 3306 -p
Enter password:
ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
应该是密码控件造成的。使用以下二者之中的一种修改:
alter user 'username'@'hostIp' identified by 'password' password expire never;
# 或
alter user 'username'@'hostIp' identified with mysql_native_password BY 'password';
flush privileges;
作者: 咕咚!
出处: https://www.cnblogs.com/linga/
关于作者:专注虚拟化,运维开发,RPA,Rust,Go,Python!
本文版权归作者和博客园共有,禁止*.csdn.net转载,禁止以盈利为目的的转载,转载文章,但未经作者同意必须保留此段声明,且在文章页面明显位置给出, 原文链接 如有问题, 可邮件(oldsixa@163.com)咨询.