Skip to content

Use of Environment Variables MYSQL_DATABASE - has no effect #448

@fkaminski

Description

@fkaminski

ISSUE TYPE

  • Feature request

SUMMARY

I am using the "docker-volumes" branch with "Docker Toolbox v18.09.0" -
tested with Windows 7/10 Home.

The "mysql-5.7" Server Image is set in the ".env" file.

For the mysql service the MYSQL_ROOT_PASSWORD is already in use.
I have tried to set the MYSQL_DATABASE variable in the docker-compose.yml for testing purpose like:

mysql:
  environment:
    - MYSQL_DATABASE=db_devilbox

to create a default database on start,
so i do not need to create a database manually - see:

https://hub.docker.com/_/mysql
https://hub.docker.com/_/mariadb

Unfortunately, this has no effect at all.
When i start the container with "docker-compose up -d httpd php mysql"
there is no database "db_devilbox" created - checked via phpMyAdmin.

Goal

Use of the MYSQL_DATABASE variable in ".env" / "docker-compose.yml" for the mysql service to create a default database on container/service start.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions