#87 password single quote to double quote
This commit is contained in:
parent
b33a39144d
commit
6c939906dd
1 changed files with 5 additions and 4 deletions
|
@ -507,7 +507,7 @@ sub mysql_setup {
|
||||||
|
|
||||||
# Did we already get a username and password passed on the command line?
|
# Did we already get a username and password passed on the command line?
|
||||||
if ( $opt{user} ne 0 and $opt{pass} ne 0 ) {
|
if ( $opt{user} ne 0 and $opt{pass} ne 0 ) {
|
||||||
$mysqllogin = "-u $opt{user} -p'$opt{pass}'" . $remotestring;
|
$mysqllogin = "-u $opt{user} -p\"$opt{pass}\"" . $remotestring;
|
||||||
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
||||||
if ( $loginstatus =~ /mysqld is alive/ ) {
|
if ( $loginstatus =~ /mysqld is alive/ ) {
|
||||||
goodprint
|
goodprint
|
||||||
|
@ -649,16 +649,17 @@ sub mysql_setup {
|
||||||
$mysqllogin = "-u $name";
|
$mysqllogin = "-u $name";
|
||||||
|
|
||||||
if ( length($password) > 0 ) {
|
if ( length($password) > 0 ) {
|
||||||
$mysqllogin .= " -p'$password'";
|
$mysqllogin .= " -p\"$password\"";
|
||||||
}
|
}
|
||||||
$mysqllogin .= $remotestring;
|
$mysqllogin .= $remotestring;
|
||||||
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
||||||
|
debugprint "Login status command: $mysqladmincmd ping $mysqllogin 2>&1";
|
||||||
if ( $loginstatus =~ /mysqld is alive/ ) {
|
if ( $loginstatus =~ /mysqld is alive/ ) {
|
||||||
print STDERR "";
|
print STDERR "";
|
||||||
if ( !length($password) ) {
|
if ( !length($password) ) {
|
||||||
|
|
||||||
# Did this go well because of a .my.cnf file or is there no password set?
|
# Did this go well because of a .my.cnf file or is there no password set?
|
||||||
my $userpath = `ls -d ~`;
|
my $userpath = `printenv HOME`;
|
||||||
chomp($userpath);
|
chomp($userpath);
|
||||||
unless ( -e "$userpath/.my.cnf" ) {
|
unless ( -e "$userpath/.my.cnf" ) {
|
||||||
badprint
|
badprint
|
||||||
|
@ -668,7 +669,7 @@ sub mysql_setup {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
badprint " Attempted to use login credentials, but they were invalid.";
|
badprint "Attempted to use login credentials, but they were invalid.";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Reference in a new issue