Mysql8Docker安装方式
#创建docker-compose.yaml
version: '2'
services:
mysqlws:
privileged: true
image: mysql8:ws
environment:
MYSQL_ROOT_PASSWORD: 12321321!
security_opt:
- seccomp:unconfined
stdin_open: true
volumes:
#持久化数据目录
- /home/dbdata/mysql/data/xfy/data/:/var/lib/mysql
#持久化配置文件
- /home/dbdata/mysql/data/xfy/conf/:/etc/mysql
#日志
- /home/dbdata/mysql/data/xfy/logs/:/var/log/mysql
#时间校对
- /etc/localtime:/etc/localtime
tty: true
pid: host
ports:
- 33109:3306/tcp
#启动安装
docker-compose up -d
评论区