From dda90d669c5cf5f2771101a4886d759881c1775d Mon Sep 17 00:00:00 2001 From: Jean-Marie Renouard Date: Fri, 21 Apr 2017 00:33:20 +0200 Subject: [PATCH] Default host should be 127.0.0.1 #312 --- mysqltuner.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index 95ee8e5..d513069 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -721,7 +721,7 @@ sub mysql_setup { if ( $opt{socket} ne 0 ) { $remotestring = " -S $opt{socket} -P $opt{port}"; } - + # Are we being asked to connect to a remote server? if ( $opt{host} ne 0 ) { chomp( $opt{host} ); @@ -739,6 +739,8 @@ sub mysql_setup { if ( ( $opt{host} ne "127.0.0.1" ) && ( $opt{host} ne "localhost" ) ) { $doremote = 1; } + } else { + $opt{host}='127.0.0.1'; } # Did we already get a username without password on the command line?