Navicate连接MYSQL8问题

  • Post author:
  • Post category:mysql


Navicate连接mysql8遇到的两个问题点:

1.mysql 的root用户的host为loacalhost时,Navicate会提示无法连接,Error 1130:host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to this MySQL server

解决方法:登陆MySQL数据库或使用MySQL Workbech,把root用的host从localhost改为 %

MySQL语句:

mysql -uroot -pxxxx –xxxx为root用户密码

mysql>use mysql;

mysql>update mysql.user set host=’%’ where user=’root’ and host=’loacalhost’;

mysql>flush privileges;

2.Navicate连接Mysql 提示,Error 2059:Authentication plugin ‘Caching_sha2_password’ cannot be loaded

原因:Mysql8使用验证方式是 Caching_sha2_password,而Navicate不支持这种验证方式

解决办法:将验证方法改为以前版本(5.7及以下)使用的验证方式:mysql_native_password

SQL语句:

mysql>alter mysql.user ‘root’@’%’ identified by ‘xxxx’ password expire never; #修改加密规则

mysql>alter mysql.user ‘root’@’%’ identified with mysql_native_password by ‘xxxx’ #更新用户密码

mysql>flush privileges; #刷新权限



版权声明:本文为xue72725264原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。