From e1e98303480459cbf4d402fa7a1c71fed308343c Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Mon, 8 May 2017 23:49:37 +0800 Subject: [PATCH 1/2] mariadb container create multiple database. --- mariadb/docker-entrypoint-initdb.d/.gitignore | 1 + mariadb/docker-entrypoint-initdb.d/createdb.sql.example | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 mariadb/docker-entrypoint-initdb.d/.gitignore create mode 100644 mariadb/docker-entrypoint-initdb.d/createdb.sql.example diff --git a/mariadb/docker-entrypoint-initdb.d/.gitignore b/mariadb/docker-entrypoint-initdb.d/.gitignore new file mode 100644 index 0000000..d1b811b --- /dev/null +++ b/mariadb/docker-entrypoint-initdb.d/.gitignore @@ -0,0 +1 @@ +*.sql diff --git a/mariadb/docker-entrypoint-initdb.d/createdb.sql.example b/mariadb/docker-entrypoint-initdb.d/createdb.sql.example new file mode 100644 index 0000000..07b277e --- /dev/null +++ b/mariadb/docker-entrypoint-initdb.d/createdb.sql.example @@ -0,0 +1,8 @@ +### +### Copy createdb.sql.example to createdb.sql +### then uncomment and set database name to create you need databases +### + +#CREATE DATABASE IF NOT EXISTS `dev_db_1` ; +#CREATE DATABASE IF NOT EXISTS `dev_db_2` ; +#CREATE DATABASE IF NOT EXISTS `dev_db_3` ; From e2d60be3e51b8cc38321df760e509801d8e66c45 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Mon, 8 May 2017 23:50:19 +0800 Subject: [PATCH 2/2] percona container create multiple database. --- percona/docker-entrypoint-initdb.d/.gitignore | 1 + percona/docker-entrypoint-initdb.d/createdb.sql.example | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 percona/docker-entrypoint-initdb.d/.gitignore create mode 100644 percona/docker-entrypoint-initdb.d/createdb.sql.example diff --git a/percona/docker-entrypoint-initdb.d/.gitignore b/percona/docker-entrypoint-initdb.d/.gitignore new file mode 100644 index 0000000..d1b811b --- /dev/null +++ b/percona/docker-entrypoint-initdb.d/.gitignore @@ -0,0 +1 @@ +*.sql diff --git a/percona/docker-entrypoint-initdb.d/createdb.sql.example b/percona/docker-entrypoint-initdb.d/createdb.sql.example new file mode 100644 index 0000000..07b277e --- /dev/null +++ b/percona/docker-entrypoint-initdb.d/createdb.sql.example @@ -0,0 +1,8 @@ +### +### Copy createdb.sql.example to createdb.sql +### then uncomment and set database name to create you need databases +### + +#CREATE DATABASE IF NOT EXISTS `dev_db_1` ; +#CREATE DATABASE IF NOT EXISTS `dev_db_2` ; +#CREATE DATABASE IF NOT EXISTS `dev_db_3` ;