From e95b757391db3ec1953a405db3417dc680a51dc7 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 3 Dec 2014 16:03:48 -0600 Subject: [PATCH 1/3] Doc: adding documentation for init-file enhancements --- mysql/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mysql/README.md b/mysql/README.md index eca5f7106afa..29aaad5778c7 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -79,6 +79,14 @@ a user/password was supplied (via the `MYSQL_USER` and `MYSQL_PASSWORD` environment variables) then that user account will be granted (`GRANT ALL`) access to this database. +## Executing Additional Scripts + +You can add additional scripts to be included in the `--init-file` by placing the `*.sql` scripts in the `/docker-entrypoint-initdb.d` directory in your docker container. There are limitations to the `--init-file` listed on the [mysql documentation](http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_init-file). An example script may look like this: + + CREATE USER 'foo'@'%' IDENTIFIED BY 'foo'; + CREATE DATABASE foobar; + GRANT ALL on foobar.* to 'foo'@'%'; + # Caveats If there is no database when `mysql` starts in a container, then `mysql` will From 0c93c4ec61ce329487409ebcdf6fe92de9e6f022 Mon Sep 17 00:00:00 2001 From: williamsbdev Date: Wed, 3 Dec 2014 19:12:02 -0600 Subject: [PATCH 2/3] Doc: moving documentation to the content.md --- mysql/README.md | 8 -------- mysql/content.md | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mysql/README.md b/mysql/README.md index 29aaad5778c7..eca5f7106afa 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -79,14 +79,6 @@ a user/password was supplied (via the `MYSQL_USER` and `MYSQL_PASSWORD` environment variables) then that user account will be granted (`GRANT ALL`) access to this database. -## Executing Additional Scripts - -You can add additional scripts to be included in the `--init-file` by placing the `*.sql` scripts in the `/docker-entrypoint-initdb.d` directory in your docker container. There are limitations to the `--init-file` listed on the [mysql documentation](http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_init-file). An example script may look like this: - - CREATE USER 'foo'@'%' IDENTIFIED BY 'foo'; - CREATE DATABASE foobar; - GRANT ALL on foobar.* to 'foo'@'%'; - # Caveats If there is no database when `mysql` starts in a container, then `mysql` will diff --git a/mysql/content.md b/mysql/content.md index 20d61b9db9ea..8b2c2b44bb8a 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -67,6 +67,18 @@ a user/password was supplied (via the `MYSQL_USER` and `MYSQL_PASSWORD` environment variables) then that user account will be granted (`GRANT ALL`) access to this database. +## Executing Additional Scripts + +You can add additional scripts to be included in the `--init-file` by placing +the `*.sql` scripts in the `/docker-entrypoint-initdb.d` directory in your +docker container. There are limitations to the `--init-file` listed on the +[mysql documentation](http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_init-file). +An example script may look like this: + + CREATE USER 'foo'@'%' IDENTIFIED BY 'foo'; + CREATE DATABASE foobar; + GRANT ALL on foobar.* to 'foo'@'%'; + # Caveats If there is no database when `mysql` starts in a container, then `mysql` will From cfa842cb3dc3aea3ea7982a75ad8199f1e620043 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Thu, 4 Dec 2014 11:29:13 -0600 Subject: [PATCH 3/3] Doc: running update.sh for README.md --- mysql/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mysql/README.md b/mysql/README.md index eca5f7106afa..516df1e48232 100644 --- a/mysql/README.md +++ b/mysql/README.md @@ -79,6 +79,18 @@ a user/password was supplied (via the `MYSQL_USER` and `MYSQL_PASSWORD` environment variables) then that user account will be granted (`GRANT ALL`) access to this database. +## Executing Additional Scripts + +You can add additional scripts to be included in the `--init-file` by placing +the `*.sql` scripts in the `/docker-entrypoint-initdb.d` directory in your +docker container. There are limitations to the `--init-file` listed on the +[mysql documentation](http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_init-file). +An example script may look like this: + + CREATE USER 'foo'@'%' IDENTIFIED BY 'foo'; + CREATE DATABASE foobar; + GRANT ALL on foobar.* to 'foo'@'%'; + # Caveats If there is no database when `mysql` starts in a container, then `mysql` will