centos7+docker +mysql配置远程连接笔记

时间:2020-03-14 13:00:54   收藏:0   阅读:522

1,参考https://yeasy.gitbooks.io/docker_practice/install/centos.html 安装docker

2,参考https://www.runoob.com/docker/docker-install-mysql.html 安装mysql

进入mysql进行操作docker exec -it mysql5719 bash (mysql5719是容器名)

技术分享图片

 

输入mysql -u root -p,再输入mysql密码

技术分享图片

 

 

 

mysql -u root –p
mysql>use mysql;
mysql>update user set host = ‘%‘ where user = ‘root‘;
mysql>select host, user from user;
mysql>ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;(解决

Authentication plugin ‘caching_sha2_password‘ cannot be loaded错误

)
技术分享图片

 

 记得需要配置好centos7的防火墙

技术分享图片

 

 

 

 

 

 

原文:https://www.cnblogs.com/lza945/p/12491179.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!