Skip to content

Commit 36f2030

Browse files
committed
Pass extra mysqld flags to mysql_install_db
1 parent 9357906 commit 36f2030

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

5.5/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
8888
mkdir -p "$DATADIR"
8989

9090
echo 'Initializing database'
91-
mysql_install_db --datadir="$DATADIR" --rpm --basedir=/usr/local/mysql
91+
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
92+
mysql_install_db --datadir="$DATADIR" --rpm --basedir=/usr/local/mysql "${@:2}"
9293
echo 'Database initialized'
9394

9495
SOCKET="$(_get_config 'socket' "$@")"

5.6/docker-entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
8888
mkdir -p "$DATADIR"
8989

9090
echo 'Initializing database'
91-
mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf
91+
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
92+
mysql_install_db --datadir="$DATADIR" --rpm --keep-my-cnf "${@:2}"
9293
echo 'Database initialized'
9394

9495
SOCKET="$(_get_config 'socket' "$@")"

0 commit comments

Comments
 (0)