标签:home operator mysqld 环境 pid rip 技术 pass address
$ docker search mysql
$ docker pull mysql:5.7.19
$ docker run --name mysql -p 3306:3306 -v /home/mysql/data:/var/lib/mysql -v /home/mysql/conf.d:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7.19
命令解析:
$ docker ps
$ docker exec -it 7a036187d7b9 /bin/sh
$ mysql -uroot -p
输入密码
输入mysql查询语句
mysql> select host,user,plugin,authentication_string from mysql.user;
‘%‘表示任何ip都可以访问
mysql> ALTER USER ‘root‘@‘%‘ IDENTIFIED WITH mysql_native_password BY ‘123456‘;
标签:home operator mysqld 环境 pid rip 技术 pass address
原文地址:https://www.cnblogs.com/jtlgb/p/12220808.html