Bug #54004 : mysql_secure_installation identifies "local host" incorrectly
The removal of non-local root users is overzealous in mysql_secure_installation. (Bug #54004)
This commit is contained in:
parent
0f3493a490
commit
edf16dbeb3
@ -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";
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user