Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
1eaac78f
Commit
1eaac78f
authored
May 13, 2017
by
Winfried
Committed by
GitHub
May 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #936 from bestlong/fix-mariadb-create-multiple-db-user-cant-see
Fixing MariaDB service create multiple db solution
parents
be9f7f83
855241d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
docker-compose.yml
docker-compose.yml
+1
-0
createdb.sql.example
mariadb/docker-entrypoint-initdb.d/createdb.sql.example
+24
-4
No files found.
docker-compose.yml
View file @
1eaac78f
...
...
@@ -242,6 +242,7 @@ services:
build
:
./mariadb
volumes
:
-
${DATA_SAVE_PATH}/mariadb:/var/lib/mysql
-
./mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
ports
:
-
"
${MARIADB_PORT}:3306"
environment
:
...
...
mariadb/docker-entrypoint-initdb.d/createdb.sql.example
View file @
1eaac78f
###
### Copy createdb.sql.example to createdb.sql
### then uncomment and set database name to create you need databases
### 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 mariadb container start and $DATA_SAVE_PATH/mariadb not exists.
###
### if your $DATA_SAVE_PATH/mariadb is exists and you do not want to delete it, you can run by manual execution:
###
### docker-compose exec mariadb 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'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_2`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` COLLATE 'utf8_general_ci' ;
#GRANT ALL ON `dev_db_3`.* TO 'default'@'%' ;
#CREATE DATABASE IF NOT EXISTS `dev_db_1` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_2` ;
#CREATE DATABASE IF NOT EXISTS `dev_db_3` ;
FLUSH PRIVILEGES ;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment