From fb71beb0fc1fec8efd72c40ba5ee727b64591d51 Mon Sep 17 00:00:00 2001 From: Justus Leiner Date: Tue, 7 Oct 2025 11:07:42 +0200 Subject: [PATCH 1/2] Update content.md --- mysql/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql/content.md b/mysql/content.md index 9b21973bd9ca..d95ad170a9a8 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -134,7 +134,7 @@ Currently, this is only supported for `MYSQL_ROOT_PASSWORD`, `MYSQL_ROOT_HOST`, # Initializing a fresh instance -When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql` and `.sql.gz` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/storage/bind-mounts/) and provide [custom images](https://docs.docker.com/reference/dockerfile/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable. +When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql`, `.sql.gz`, `.sql.bz2`, `.sql.xz` and `.sql.zst` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. `.sh` files without file execute permission are sourced rather than executed. You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/storage/bind-mounts/) and provide [custom images](https://docs.docker.com/reference/dockerfile/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable. # Caveats From 17b24dea099b4c2580b5d8ff5786d7e3eb01d753 Mon Sep 17 00:00:00 2001 From: Justus Leiner Date: Wed, 8 Oct 2025 09:19:39 +0200 Subject: [PATCH 2/2] Update mysql/content.md Co-authored-by: Tianon Gravi --- mysql/content.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql/content.md b/mysql/content.md index d95ad170a9a8..bb01851051bd 100644 --- a/mysql/content.md +++ b/mysql/content.md @@ -134,7 +134,9 @@ Currently, this is only supported for `MYSQL_ROOT_PASSWORD`, `MYSQL_ROOT_HOST`, # Initializing a fresh instance -When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql`, `.sql.gz`, `.sql.bz2`, `.sql.xz` and `.sql.zst` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. `.sh` files without file execute permission are sourced rather than executed. You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/storage/bind-mounts/) and provide [custom images](https://docs.docker.com/reference/dockerfile/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable. +When a container is started for the first time, a new database with the specified name will be created and initialized with the provided configuration variables. Furthermore, it will execute files with extensions `.sh`, `.sql`, `.sql.gz`, `.sql.bz2`, `.sql.xz`, and `.sql.zst` that are found in `/docker-entrypoint-initdb.d`. Files will be executed in alphabetical order. When parsing `.sh` files without the execute bit set, they are `source`d rather than executed. + +You can easily populate your `%%IMAGE%%` services by [mounting a SQL dump into that directory](https://docs.docker.com/storage/bind-mounts/) and provide [custom images](https://docs.docker.com/reference/dockerfile/) with contributed data. SQL files will be imported by default to the database specified by the `MYSQL_DATABASE` variable. # Caveats