容器: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 -u root -p
#接着输入你的密码
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';