Skip to content

Commit 481f892

Browse files
Remove MYSQL_USER and MYSQL_PASSWORD from docker-compose.yaml (#1123)
The right way to configure the *root* password is using the environment variable `MYSQL_ROOT_PASSWORD`. It also remove the `MYSQL_PASSWORD` because is only used the root user. From MySQL log: ``` 2021-08-13 20:28:55+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2021-08-13 20:28:55+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.26-1debian10 started. 2021-08-13 20:28:55+00:00 [ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user Remove MYSQL_USER="root" and use one of the following to control the root user password: - MYSQL_ROOT_PASSWORD - MYSQL_ALLOW_EMPTY_PASSWORD - MYSQL_RANDOM_ROOT_PASSWORD ``` Co-authored-by: Kyle Conroy <[email protected]>
1 parent f7f0b86 commit 481f892

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ services:
77
restart: always
88
environment:
99
MYSQL_DATABASE: dinotest
10-
MYSQL_PASSWORD: mysecretpassword
1110
MYSQL_ROOT_PASSWORD: mysecretpassword
12-
MYSQL_USER: root
1311

1412
postgresql:
1513
image: "postgres:13"

0 commit comments

Comments
 (0)