容器:docker 18.03.1
镜像:mysql 8.0
连接方式:Navicat 11.0.16
提醒一句:如果直接 mysql 是 镜像市场直接下载的 记得配置:
MYSQL_ROOT_PASSWORD:你的密码
错误:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
解决步骤
先登录mysql
mysql -u root -p
your password
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '你的密码';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';
SELECT plugin FROM mysql.user WHERE User = 'root';
原博客地址
https://blog.csdn.net/qq_19707521/article/details/80226321