docker安装mysql—5.7
docker run -p 3306:3306 --name mysql -d mysql:5.7
docker run -p 3306:3306 --name mysql-scis -v /home/admin/docker/mysql/conf:/etc/mysql/conf.d -v /home/admin/docker/mysql/logs:/var/log/mysql -v /home/admin/docker/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
进入mysql,并登录
docker exec -it mysqlserver bash
mysql -uroot -p
开启远程访问权限
use mysql;
select host,user from user;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
flush privileges;