Skip to content

Commit e7c1d1b

Browse files
DisservinMeelahMe
authored andcommitted
Update content.md
1 parent 57afe73 commit e7c1d1b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mysql/content.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,21 @@ $ docker logs some-%%REPO%%
5656

5757
## Using a custom MySQL configuration file
5858

59-
The default configuration for MySQL can be found in `/etc/mysql/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d` or `/etc/mysql/mysql.conf.d`. Please inspect the relevant files and directories within the `%%IMAGE%%` image itself for more details.
59+
The default configuration for MySQL varies depending on the base image:
60+
61+
**Oracle-based images (default):** The default configuration is located at `/etc/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d`.
62+
63+
**Debian-based MySQL 8 images:** The default configuration can be found in `/etc/mysql/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d`.
64+
65+
Please inspect the relevant files and directories within the `%%IMAGE%%` image itself for more details.
6066

6167
If `/my/custom/config-file.cnf` is the path and name of your custom configuration file, you can start your `%%IMAGE%%` container like this (note that only the directory path of the custom config file is used in this command):
6268

6369
```console
6470
$ docker run --name some-%%REPO%% -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
6571
```
6672

67-
This will start a new container `some-%%REPO%%` where the MySQL instance uses the combined startup settings from `/etc/mysql/my.cnf` and `/etc/mysql/conf.d/config-file.cnf`, with settings from the latter taking precedence.
73+
This will start a new container `some-%%REPO%%` where the MySQL instance uses the combined startup settings from the default configuration file and `/etc/mysql/conf.d/config-file.cnf`, with settings from the latter taking precedence.
6874

6975
### Configuration without a `cnf` file
7076

0 commit comments

Comments
 (0)