Navicat连接Docker中的mysql报错:client does not support authentication
Posted 孤独二世
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Navicat连接Docker中的mysql报错:client does not support authentication相关的知识,希望对你有一定的参考价值。
1.进入mysql容器中
docker exec -it mysqltest(mysql容器名称) bash
2.进入mysql数据库
mysql -uroot -p
3.输入mysql密码
4.远程连接授权
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root‘@‘%‘WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
5.更改加密规则
mysql>ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER;
6.更新root用户密码
mysql>ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘密码‘;
7.刷新权限
mysql>FLUSH PRIVILEGES;
8.Navicat连接测试
以上是关于Navicat连接Docker中的mysql报错:client does not support authentication的主要内容,如果未能解决你的问题,请参考以下文章
Navicat连接Docker中的mysql报错:client does not support authentication
Navicat远程连接MongoDB最全解决方法(教程报错)
Navicat 连接mysql 报错: Authentication plugin caching_ sha2_password cannot be loaded
navicat 连接mysql报错2002-Cant‘t connect to server on “localhost“(10061)