add creating multiple databases to the docs

This commit is contained in:
Mahmoud Zalt
2017-07-04 06:01:18 +03:00
parent 50834268a7
commit 3e59a2a813
2 changed files with 31 additions and 15 deletions

View File

@ -1,20 +1,20 @@
###
### Copy createdb.sql.example to createdb.sql
### then uncomment then set database name and username to create you need databases
#
# Copy createdb.sql.example to createdb.sql
# then uncomment then set database name and username to create you need databases
#
# example: .env MYSQL_USER=appuser and need db name is myshop_db
#
# CREATE DATABASE IF NOT EXISTS `myshop_db` ;
# GRANT ALL ON `myshop_db`.* TO 'appuser'@'%' ;
#
###
### this sql script is auto run when mysql container start and $DATA_SAVE_PATH/mysql not exists.
###
### if your $DATA_SAVE_PATH/mysql is exists and you do not want to delete it, you can run by manual execution:
###
### docker-compose exec mysql bash
### mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
###
#
# this sql script will auto run when the mysql container starts and the $DATA_SAVE_PATH/mysql not found.
#
# if your $DATA_SAVE_PATH/mysql exists and you do not want to delete it, you can run by manual execution:
#
# docker-compose exec mysql bash
# mysql -u root -p < /docker-entrypoint-initdb.d/createdb.sql
#
#CREATE DATABASE IF NOT EXISTS `dev_db_1` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_1`.* TO 'default'@'%' ;