Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to specify multi databases/schemas with MYSQL_DATABASE #1613

Closed
hatzhang opened this issue Dec 4, 2019 · 2 comments
Closed

Want to specify multi databases/schemas with MYSQL_DATABASE #1613

hatzhang opened this issue Dec 4, 2019 · 2 comments

Comments

@hatzhang
Copy link

hatzhang commented Dec 4, 2019

like the following:
MYSQL_DATABASE=db1;db2;db3

there are some workarounds:
https://gist.github.com/MKagesawa/a03892b8c44c015cd991c2c5311f1768

@hatzhang hatzhang changed the title Want to specify multi databases with MYSQL_DATABASE Want to specify multi databases/schemas with MYSQL_DATABASE Dec 4, 2019
@wglambert
Copy link
Contributor

You can make a .sql file that will create databases and mount it to /docker-entrypoint-initdb.d/
https://github.com/docker-library/docs/tree/master/mysql#initializing-a-fresh-instance

@yosifkit
Copy link
Member

yosifkit commented Dec 4, 2019

Correct, we only support one database in the MYSQL_DATABASE variable and any further SQL needed should be done via /docker-entrypoint-initdb.d/.

See also docker-library/postgres#240 (comment)

@yosifkit yosifkit closed this as completed Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants