本地navicate连接不上远程mysql主机
远程连接docker容器中的mysql8.0数据库时出现连接不上
[root@centos7 ~]# mysql -u root -p #登陆mysql
mysql> use mysql; # 切换mysql数据库
mysql> select user,plugin from user where user='root'; #查看root的加密方式
alter user 'root'@'%' identified with mysql_native_password by 'root';
mysql> select user,plugin from user where user='root';
Navicat连接远程mysql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
use mysql;
update user set host = '%' where user ='root';
flush privileges;