Skip to content

Commit 6283d0d

Browse files
Run update.sh
1 parent 77f12e7 commit 6283d0d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mysql/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,21 @@ $ docker logs some-mysql
124124

125125
## Using a custom MySQL configuration file
126126

127-
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 `mysql` image itself for more details.
127+
The default configuration for MySQL varies depending on the base image:
128+
129+
**Oracle-based images (default):** The default configuration is located at `/etc/my.cnf`, which may `!includedir` additional directories such as `/etc/mysql/conf.d`.
130+
131+
**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`.
132+
133+
Please inspect the relevant files and directories within the `mysql` image itself for more details.
128134

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

131137
```console
132138
$ docker run --name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
133139
```
134140

135-
This will start a new container `some-mysql` 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.
141+
This will start a new container `some-mysql` 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.
136142

137143
### Configuration without a `cnf` file
138144

0 commit comments

Comments
 (0)