Skip to content

Mysql container fails to start because MYSQL_ROOT_PASSWORD not set #600

@zeocs

Description

@zeocs

I installed deming a according to the instructions for Docker in the README.

When I try to $ docker compose up -d, the container deming-mysql-1 fails to start. Inspecting the issue:

# docker logs fb1d62ec377d
2026-04-09 07:21:51+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.6.0-1.el9 started.
2026-04-09 07:21:52+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2026-04-09 07:21:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.6.0-1.el9 started.
2026-04-09 07:21:52+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
    You need to specify one of the following as an environment variable:
    - MYSQL_ROOT_PASSWORD
    - MYSQL_ALLOW_EMPTY_PASSWORD
    - MYSQL_RANDOM_ROOT_PASSWORD

I had a look at the codebase, and it seems like MYSQL_ROOT_PASSWORD is intended to be set:

# grep -I -R -F 'MYSQL_ROOT_PASSWORD' .
./docker/docker-compose.yml:      MYSQL_ROOT_PASSWORD: '${DB_ROOTPASSWORD}'
./docker/docker-compose.yml:      test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD" ]
./docker-compose.yml:      MYSQL_ROOT_PASSWORD: '${DB_ROOTPASSWORD}'
./docker-compose.yml:      test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD" ]

... but it is missing from the .env file. Adding it fixes the problem.

If my understanding of the problem is correct and my fix is how this is supposed to be fixed, I can provide a pull request.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions