Navicat 连接 mysql 问题

  1. 需要将mysql配置文件设置为远程任意ip可登陆,注释掉一下两行配置
# bind-address>->---= 127.0.0.1
# mysqlx-bind-address>--= 127.0.0.1
  1. Can't connect to MySQL server on "192.168.137.139' (10013 "Unknown error")
检查Navicat是否联网
  1. Host ‘xxx’ is not allowed to connect to this MySQL server。由于mysql未开启mysql远程访问权限导致。
use mysql;
update user set host = '%' where user = 'root';
flush  privileges;
  1. Authentication plugin 'caching sha2 password' cannot be loaded:需要设置远程登录用户的密码鉴定为mysql_native_password
# 修改密码
use mysql;
select user,host,plugin from user;  # 如果登录账户的plugin是caching_sha2_password就需要执行以下命令
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpwd'; #yourpwd 改成你的密码
flush  privileges;

你可能感兴趣的:(mysql,mysql)