This commit is contained in:
GitHub Merge Button 2011-11-10 02:30:25 -08:00
commit ba50edac80

View file

@ -292,8 +292,16 @@ sub mysql_setup {
badprint "Attempted to use login credentials from Plesk, but they failed.\n"; badprint "Attempted to use login credentials from Plesk, but they failed.\n";
exit 0; exit 0;
} }
} elsif ( -r "/etc/mysql/debian.cnf" and $doremote == 0 ) {
# It's a Debian box, use the system maintenance account
$mysqllogin = "--defaults-file=/etc/mysql/debian.cnf";
my $loginstatus = `mysqladmin $mysqllogin ping 2>&1`;
unless ($loginstatus =~ /mysqld is alive/) {
badprint "Attempted to use Debian system maintenance login credentials, but they failed. Do you have permission to use them?\n";
exit 0;
}
} else { } else {
# It's not Plesk, we should try a login # It's not Plesk and not Debian, we should try a login
my $loginstatus = `mysqladmin $remotestring ping 2>&1`; my $loginstatus = `mysqladmin $remotestring ping 2>&1`;
if ($loginstatus =~ /mysqld is alive/) { if ($loginstatus =~ /mysqld is alive/) {
# Login went just fine # Login went just fine