~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to scripts/mysql_secure_installation.pl.in

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl
2
2
# -*- cperl -*-
3
3
#
4
 
# Copyright (C) 2002 MySQL AB and Jeremy Cole
 
4
# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
5
5
#
6
6
# This program is free software; you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
14
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
18
18
 
19
19
use Fcntl;
20
20
use File::Spec;
208
208
}
209
209
 
210
210
sub remove_remote_root {
211
 
  if (do_query("DELETE FROM mysql.user WHERE User='root' AND Host!='localhost';")) {
 
211
  if (do_query("DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');")) {
212
212
    print " ... Success!\n";
213
213
  } else {
214
214
    print " ... Failed!\n";