Skip to content

Commit

Permalink
Change localhost to 127.0.0.1
Browse files Browse the repository at this point in the history
security change for localhost
  • Loading branch information
skriesch authored Dec 1, 2016
1 parent ea64929 commit 4d18458
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 10.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
SET @@SESSION.SQL_LOG_BIN=0;
DELETE FROM mysql.user ;
CREATE USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}' ;
GRANT ALL ON *.* TO 'root'@'127.0.0.1' WITH GRANT OPTION ;
DROP DATABASE IF EXISTS test ;
FLUSH PRIVILEGES ;
EOSQL
Expand All @@ -129,7 +129,7 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
if [ ! -z "$APP_HOST" ]; then
APPHOST='%'
elif [ "$APP_HOST" == 'localhost' || "$APP_HOST" == '127.0.0.1' ]; then
APPHOST='localhost'
APPHOST='127.0.0.1'
else
APPHOST=$APP_HOST
fi
Expand Down

0 comments on commit 4d18458

Please sign in to comment.