summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-14 13:53:49 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-07-14 13:53:49 +0300
commitedf16dbeb3a7ee5baa5fc8da385e980a32ca9d6c (patch)
tree7260c66b192b00ca1a433ee52f34ec524c588b0b /scripts
parent0f3493a490fbd903cb3f13719c1091e02925b70b (diff)
downloadmariadb-git-edf16dbeb3a7ee5baa5fc8da385e980a32ca9d6c.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-xscripts/mysql_secure_installation.pl.in2
-rw-r--r--scripts/mysql_secure_installation.sh2
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