diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-07-14 13:53:49 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2010-07-14 13:53:49 +0300 |
commit | 1919414fbea08e73d326b92356b89133ed447e1d (patch) | |
tree | 7260c66b192b00ca1a433ee52f34ec524c588b0b /scripts | |
parent | 266ca421da5903a97a7a52fed2032afab5df74d6 (diff) | |
download | mariadb-git-1919414fbea08e73d326b92356b89133ed447e1d.tar.gz |
Bug #54004 : mysql_secure_installation identifies "local host" incorrectly
The removal of non-local root users is overzealous in
mysql_secure_installation. (Bug #54004)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mysql_secure_installation.pl.in | 2 | ||||
-rw-r--r-- | scripts/mysql_secure_installation.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in index 25339f9b916..0cd99267cdb 100755 --- a/scripts/mysql_secure_installation.pl.in +++ b/scripts/mysql_secure_installation.pl.in @@ -208,7 +208,7 @@ sub remove_anonymous_users { } sub remove_remote_root { - if (do_query("DELETE FROM mysql.user WHERE User='root' AND Host!='localhost';")) { + if (do_query("DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');")) { print " ... Success!\n"; } else { print " ... Failed!\n"; diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 188cd030dba..ed789677bf0 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -164,7 +164,7 @@ remove_anonymous_users() { } remove_remote_root() { - do_query "DELETE FROM mysql.user WHERE User='root' AND Host!='localhost';" + do_query "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" if [ $? -eq 0 ]; then echo " ... Success!" else |