From https://github.com/MariaDB/mariadb-docker/pull/409#issuecomment-1030646420
Mostly I'm like "why not" on this. The only problem I see is how we're going to deal with docker_exec_client: Users expect MYSQL_DATABASE and MARIADB_DATABASE to be a single database name, so we must add yet another env variable. I definitely wouldn't use CSV, but a simple space separated list.
So considering the not so obvious implementation: Why not /docker-entrypoint-initdb.d? This is no more than creating a /docker-entrypoint-initdb.d/create-another_database.sql with
CREATE DATABASE IF NOT EXISTS `another_database`;
|
GRANT ALL ON `another_database`.* TO 'my_sql_user'@'%';
|
Yes. for docker_exec_client we should trim this down to the first database of the CSV.
Madpeter do you have an answer for why not docker-entrypoint-initdb.d?
I'm ok with this concept.
Did you want to write a change to https://github.com/MariaDB/mariadb-docker/blob/master/docker-entrypoint.sh ?
Keep the MYSQL_DATABASE/MARIADB_DATABASE as simple (non-array) variables and ensure that docker_exec_client just uses the first in the list.