Skip to content

Commit 236a804

Browse files
committed
Added note about custom init scripts to readme
1 parent ca6e42c commit 236a804

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ The MySQL Server log is located at `/var/log/mysqld.log` inside the container, a
5555

5656
more /var/log/mysqld.log
5757

58+
## Running custom init scripts at database creation
59+
60+
After the database is created, the entrypoint script will execute any .sh or .sql scripts found in /docker-entrypoint-initdb.d/
61+
If you wish to execute any custom initialization scripts (e.g. for extra database or user creation), map them to this location
62+
the first time you start up the image.
63+
5864
# Environment Variables
5965

6066
When you start the MySQL image, you can adjust the configuration of the MySQL instance by passing one or more environment variables on the `docker run` command line. Do note that none of the variables below will have any effect if you start the container with a data directory that already contains a database: any pre-existing database will always be left untouched on container startup.

0 commit comments

Comments
 (0)