diff --git a/mysqltuner.pl b/mysqltuner.pl index 6090d2e..b90ab3d 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -477,14 +477,16 @@ sub mysql_setup { $opt{port} = ( $opt{port} eq 0 ) ? 3306 : $opt{port}; # If we're doing a remote connection, but forcemem wasn't specified, we need to exit - if ( $opt{'forcemem'} eq 0 ) { + if ( $opt{'forcemem'} eq 0 && ($opt{host} ne "127.0.0.1") && ($opt{host} ne "localhost")) { badprint "The --forcemem option is required for remote connections"; exit 1; } infoprint "Performing tests on $opt{host}:$opt{port}"; $remotestring = " -h $opt{host} -P $opt{port}"; - $doremote = 1; + if (($opt{host} ne "127.0.0.1") && ($opt{host} ne "localhost")) { + $doremote = 1; + } } # Did we already get a username and password passed on the command line? @@ -3048,7 +3050,7 @@ Jean-Marie Renouard =item * -Stephan Großberndt +Stephan Großberndt =back @@ -3095,4 +3097,4 @@ along with this program. If not, see . # indent-tabs-mode: t # cperl-indent-level: 8 # perl-indent-level: 8 -# End: +# End: \ No newline at end of file