大家好,欢迎来到IT知识分享网。
navicat连接mysql 8.0_2059错误
【报错原因】mysql8.0 之前的版本中加密规则是 mysql_native_password,而 mysql8.0 之后的版本加密规则是caching_sha2_password
【解决方案】修改 mysql8.0 的加密规则
# 连接 mysql 服务器 mysql -u root -p # 进入 mysql 数据库 mysql> use mysql; # 查看 user 表 mysql> select user,host from user; # 设置登录密码永不过期(password改为自己的) mysql> alter user 'root'@'localhost' identified by 'password' password expire never; mysql> alter user 'root'@'%' identified by 'password' password expire never; # 修改加密规则(password改为自己的) mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'password'; mysql> alter user 'root'@'%' identified with mysql_native_password by 'password'; # 刷新权限 mysql> flush privileges; # 退出 mysql> quit
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/137749.html