Skip to content

Commit

Permalink
Drop user deletion from 5.7 and 8.0
Browse files Browse the repository at this point in the history
MySQL 5.7 and newer no longer creates the various unwanted users (root@various hosts)
that were created in older versions, so the deletion isn't needed, and only
creates extra maintenance work if any changes to the system users are made.
  • Loading branch information
ltangvald committed Feb 23, 2018
1 parent c5ce5cc commit ad625c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion 5.7/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
-- or products like mysql-fabric won't work
SET @@SESSION.SQL_LOG_BIN=0;
DELETE FROM mysql.user WHERE user NOT IN ('mysql.session', 'mysql.sys', 'root') OR host NOT IN ('localhost') ;
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
${rootCreate}
Expand Down
1 change: 0 additions & 1 deletion 8.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
-- or products like mysql-fabric won't work
SET @@SESSION.SQL_LOG_BIN=0;
DELETE FROM mysql.user WHERE user NOT IN ('mysql.infoschema', 'mysql.session', 'mysql.sys', 'root') OR host NOT IN ('localhost') ;
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
${rootCreate}
Expand Down

0 comments on commit ad625c6

Please sign in to comment.