digdeep

凡是过去,皆是序幕。Read the fucking manual and source code.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

mysql -uroot -p 连接MySQL8.0时报错:

ERROR 2059 (HY000): Plugin caching_sha2_password could not be loaded

原因是,MySQL 8.0默认用的密码加密插件是 caching_sha2_password ,原来是用的 mysql_native_password 插件。

新建一个 mysql_native_password 插件加密的用户:

create user root@'%' identified WITH mysql_native_password BY 'xxxxx';
grant all privileges on *.* to root@'%' with grant option;
flush privileges;
然后再连接MySQL 8.0就不报错了。

 

posted on 2024-03-21 22:32  digdeep  阅读(7)  评论(0编辑  收藏  举报
不懂数据库和Web安全的架构师不是一个好的程序员。