Loading... 一大早,研发和测试过来说数据库无法连接。 查看他使用的是navicat primium15,连接mysql8报错。 Authentication plugin 'caching_sha2_password' cannot be loaded 查找后发现,出现这个原因是mysql8 之前的版本中加密规则是mysql_native_password,而在mysql8之后,加密规则是caching_sha2_password。 ``` ALTER USER 'root'@'%' IDENTIFIED BY 'xxx' PASSWORD EXPIRE NEVER; ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'xxx'; FLUSH PRIVILEGES; alter user 'root'@'%' identified by 'xxx'; ``` 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏