navicat 连不上docker中的mysql8

 

 

重启docker解决了。

systemctl daemon-reload
systemctl restart docker
 

 

 

还有一个本机Navicat连接的时候也会遇到问题(mysql8+版本加密规则)

需要进到docker容器修改一下mysql加密方法

 

#进入某个容器
docker exec -it ecdf3870557e   /bin/bash
 
mysql -uroot -p123
 
alter user 'root'@'%' identified by '123' password expire never;
alter user 'root'@'%' identified with mysql_native_password by '1234';
flush privileges;

 

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