标签:mysql exec ges 进入 pass cat roo auth l数据库
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
标签:mysql exec ges 进入 pass cat roo auth l数据库
原文地址:https://www.cnblogs.com/guduershi/p/10472271.html