diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index d0821e663c4..601866c40c7 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -208,7 +208,7 @@ if ($opt{socket} and -S $opt{socket}) else { $dsn .= "host=" . $opt{host}; - if ($opt{host} ne "localhost") + if ($opt{host} ne "localhost" and $opt{port}) { $dsn .= ";port=". $opt{port}; }