diff --git a/5.5/docker-entrypoint.sh b/5.5/docker-entrypoint.sh index cd1855f3f..647619cfd 100755 --- a/5.5/docker-entrypoint.sh +++ b/5.5/docker-entrypoint.sh @@ -158,6 +158,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then DELETE FROM mysql.user WHERE user NOT IN ('mysql.sys', 'mysqlxsys', 'root') OR host NOT IN ('localhost') ; SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ; + FLUSH PRIVILEGES ; ${rootCreate} DROP DATABASE IF EXISTS test ; FLUSH PRIVILEGES ; diff --git a/5.6/docker-entrypoint.sh b/5.6/docker-entrypoint.sh index 7dbd6975a..46ebdbc00 100755 --- a/5.6/docker-entrypoint.sh +++ b/5.6/docker-entrypoint.sh @@ -158,6 +158,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then DELETE FROM mysql.user WHERE user NOT IN ('mysql.sys', 'mysqlxsys', 'root') OR host NOT IN ('localhost') ; SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ; + FLUSH PRIVILEGES ; ${rootCreate} DROP DATABASE IF EXISTS test ; FLUSH PRIVILEGES ; diff --git a/5.7/docker-entrypoint.sh b/5.7/docker-entrypoint.sh index b38c11287..fe7a8cf9a 100755 --- a/5.7/docker-entrypoint.sh +++ b/5.7/docker-entrypoint.sh @@ -163,6 +163,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ; + FLUSH PRIVILEGES ; ${rootCreate} DROP DATABASE IF EXISTS test ; FLUSH PRIVILEGES ; diff --git a/8.0/docker-entrypoint.sh b/8.0/docker-entrypoint.sh index 720ef6d65..17248882d 100755 --- a/8.0/docker-entrypoint.sh +++ b/8.0/docker-entrypoint.sh @@ -165,6 +165,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ; + FLUSH PRIVILEGES ; ${rootCreate} DROP DATABASE IF EXISTS test ; FLUSH PRIVILEGES ;