docker-compose安装MySQL8.0
docker-compose安装MySQL8.0直接上docker-compose配置文件version: "3"services:db:image: mysql:8restart: alwaysenvironment:MYSQL_ROOT_PASSWORD: root_password123MYSQL_DATABAS...
·
docker-compose安装MySQL8.0
直接上docker-compose配置文件
version: "3"
services:
db:
image: mysql:8
restart: always
environment:
MYSQL_ROOT_PASSWORD: root_password123
MYSQL_DATABASE: doinb_db1
MYSQL_USER: doinb_user
MYSQL_PASSWORD: doinb_user_pwd123
command:
--max_connections=1000
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
volumes:
- ./db:/var/lib/mysql
在虚拟机联网正常的情况下,直接 docker-compose -d --build 启动即可!
更多推荐
已为社区贡献2条内容
所有评论(0)