🔧 Modify multiple database

This commit is contained in:
kimjaeyeol
2021-10-22 16:33:29 +09:00
parent 7f2499bf11
commit f4ebe9b48c
2 changed files with 3 additions and 1 deletions

View File

@@ -3,8 +3,8 @@ services:
mysql:
image: mysql:5.7
environment: # 환경변수
MYSQL_MULTIPLE_DATABASES: msaportal,reservation
MYSQL_USER: msaportal
MYSQL_DATABASE: msaportal
MYSQL_PASSWORD: msaportal
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_HOST: "%"
@@ -14,6 +14,7 @@ services:
- --collation-server=utf8mb4_unicode_ci
volumes:
- "${HOME}/docker-volume/mysql/:/var/lib/mysql"
- ./init.sql:/data/application/init.sql
ports:
- "3306:3306"
container_name: mysql

View File

@@ -0,0 +1 @@
CREATE DATABASE IF NOT EXISTS reservation;