From 36f2030de879bea73e808183302d27c3b670ce7a Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 21 Dec 2017 13:34:50 -0800 Subject: [PATCH] Pass extra mysqld flags to mysql_install_db --- 5.5/docker-entrypoint.sh | 3 ++- 5.6/docker-entrypoint.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/5.5/docker-entrypoint.sh b/5.5/docker-entrypoint.sh index e85315f60..122ff2ddd 100755 --- a/5.5/docker-entrypoint.sh +++ b/5.5/docker-entrypoint.sh @@ -88,7 +88,8 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then mkdir -p "$DATADIR" echo 'Initializing database' - mysql_install_db --datadir="$DATADIR" --rpm --basedir=/usr/local/mysql + # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) + mysql_install_db --datadir="$DATADIR" --rpm --basedir=/usr/local/mysql "${@:2}" echo 'Database initialized' SOCKET="$(_get_config 'socket' "$@")" diff --git a/5.6/docker-entrypoint.sh b/5.6/docker-entrypoint.sh index 912875dca..e654ea63e 100755 --- a/5.6/docker-entrypoint.sh +++ b/5.6/docker-entrypoint.sh @@ -88,7 +88,8 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then mkdir -p "$DATADIR" echo 'Initializing database' - mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf + # "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here) + mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf "${@:2}" echo 'Database initialized' SOCKET="$(_get_config 'socket' "$@")"