Last active
May 11, 2019 13:27
-
-
Save toddlerya/0231ef6c902db746294412836c325461 to your computer and use it in GitHub Desktop.
mysql_docker-compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mysql_db: | |
image: mysql:5.7 | |
container_name: mysql_db | |
privileged: true | |
ports: | |
- 3306:3306 | |
volumes: | |
- ./data:/var/lib/mysql | |
- ./conf/my.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf | |
- ./logs:/var/log/mysql | |
environment: | |
# 请务必修改密码 | |
MYSQL_ROOT_PASSWORD: "123456" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment