docker安装mysql
作者:互联网
-
docker pull mysql:5.7
- 创建目录/mydata/mysql/log /mydata/mysql/conf /mydata/mysql/data
- docker run -itd --name mysql-back -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -v /mydata/mysql/log:/var/log/mysql -v /mydata/mysql/data:/var/lib/mysql -v /mydata/mysql/conf:/etc/mysql mysql:5.7
- docker exec -it '容器ID' bash 进入容器
标签:log,mydata,conf,mysql,3306,docker,安装 来源: https://www.cnblogs.com/dixueli/p/16311677.html