安装调试MySql经常遇到的问题

一、mysql 8.x

1、navicat 登录  caching_sha2_password can not be loaded 

mysql>alter user 'root'@'localhost' identified with mysql_native_password by 'root账户的密码';
mysql>flush privileges;

 这里需要注意,如果本文2中的命令先执行了,那么需要将location改为%

 

2、navicat登录 错误提示 host is not allowed to connect server或1130错误

登录客户端命令行程序,依次输入以下指令,开启mysql的远程连接

mysql>use mysql;
mysql>update user set host = '%' where user='root';
mysql>flush privileges;

确认更新是否成功

 select host from user where user ='root';

 

 

 ok,说明更新成功,再次通过navicat登录

posted @ 2022-09-01 14:34  郑小超  阅读(26)  评论(0编辑  收藏  举报