Docker的MySQL8镜像, 实行数据持久化
version: '3.1'
services:
mysql-itoken-service-admin:
restart: always
image: mysql:8.0.17
container_name: mysql-itoken-service-admin
ports:
- 3306:3306
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: q.123456
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
volumes:
- /usr/local/docker/mysql/itoken-service-admin/data:/var/lib/mysql