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
commit1919414fbea08e73d326b92356b89133ed447e1d (patch)
tree7260c66b192b00ca1a433ee52f34ec524c588b0b /scripts
parent266ca421da5903a97a7a52fed2032afab5df74d6 (diff)
downloadmariadb-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-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