Default host should be 127.0.0.1 #312

This commit is contained in:
Jean-Marie Renouard 2017-04-21 00:33:20 +02:00
parent dc7ffb01dc
commit dda90d669c

View file

@ -721,7 +721,7 @@ sub mysql_setup {
if ( $opt{socket} ne 0 ) { if ( $opt{socket} ne 0 ) {
$remotestring = " -S $opt{socket} -P $opt{port}"; $remotestring = " -S $opt{socket} -P $opt{port}";
} }
# Are we being asked to connect to a remote server? # Are we being asked to connect to a remote server?
if ( $opt{host} ne 0 ) { if ( $opt{host} ne 0 ) {
chomp( $opt{host} ); chomp( $opt{host} );
@ -739,6 +739,8 @@ sub mysql_setup {
if ( ( $opt{host} ne "127.0.0.1" ) && ( $opt{host} ne "localhost" ) ) { if ( ( $opt{host} ne "127.0.0.1" ) && ( $opt{host} ne "localhost" ) ) {
$doremote = 1; $doremote = 1;
} }
} else {
$opt{host}='127.0.0.1';
} }
# Did we already get a username without password on the command line? # Did we already get a username without password on the command line?