docker-mysql

#  --restart always \
#  --restart unless-stopped \
#  -e TZ=Asia/Shanghai \
#  --network zj-net \

docker run --name mysql-5.6 -t \
  -p 23306:3306 \
  --restart unless-stopped \
  -v /etc/timezone:/etc/timezone:ro \
	-v /etc/localtime:/etc/localtime:ro \
  -v /data/docker/mysql-5.6/conf/mysql.conf.d:/etc/mysql/mysql.conf.d \
  -v /data/docker/mysql-5.6/data:/var/lib/mysql \
  -v /data/docker/mysql-5.6/logs:/logs \
  -e MYSQL_ROOT_PASSWORD="root_pwd" \
  -e MYSQL_DATABASE="zj" \
  -e MYSQL_USER="zj" \
  -e MYSQL_PASSWORD="zj_pwd" \
  -d mysql:5.6 \
  --character-set-server=utf8
/data/docker/mysql-5.6/conf/
├── conf.d
│   ├── docker.cnf
│   ├── mysql.cnf
│   └── mysqldump.cnf
├── my.cnf -> /etc/alternatives/my.cnf
├── my.cnf.fallback
├── mysql.cnf
└── mysql.conf.d
    ├── my.cnf         # 自定义配置文件
    └── mysqld.cnf.def # 原有配置文件,扩展名修改后不再生效