Skip to content

Creating Multiple Databases without init script #338

Closed
@scrummyin

Description

@scrummyin

I found a bug/feature. I was able to create multiple databases without the need for my own dockerfile. I kinda abused the docker-entrypoint.sh. Below is a terminal session that shows how I did it

$ cat elist
MYSQL_DATABASE=one`; CREATE DATABASE IF NOT EXISTS two; CREATE DATABASE IF NOT EXISTS `three
MYSQL_ROOT_PASSWORD=pass
$ docker run -p 127.0.0.1:3306:3306 --env-file elist mysql

I'm not sure want to do with this information, but it works as a quick hack to get multiple databases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions