mysql8用户密码问题


问题

navicat连接mysql8.0.26时报错.

Client does not support authentication protocol requested by server; consider upgrading MySQL client.

解决办法

# 进入mysql
docker exec -it mysql bash
# 登录
mysql -u root -p
use mysql;
-- 查看密码加密规则,8.0后使用的是caching_sha2_password,需要修改成mysql_native_password
select user,host,plugin from user where user='root';
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
ALTER USER 'root'@'%' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
flush privileges;

文章作者: wuzhiyong
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 wuzhiyong !
评论
 上一篇
zookeeper集群部署 zookeeper集群部署
准备3台机器安装# 每台机器运行一条命令,注意ID和IP的对应 docker run -d --name zookeeper --net host --restart always -e ZOO_MY_ID=1 \ -e ZOO_SERVE
2021-08-25 wuzhiyong
下一篇 
redis哨兵模式部署 redis哨兵模式部署
配置文件sentinel.confport 26379 sentinel monitor mymaster 192.168.41.128 6379 2 sentinel down-after-milliseconds mymaster 30
2021-08-19
  目录