Browse files

update comments and logging messages

  • Loading branch information...
1 parent 2e34761 commit 27f1454b0eb6b7c1ad9ebba6ad5265aeacf798f7 @koebi001 koebi001 committed Apr 21, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 mysqltuner.pl
View
9 mysqltuner.pl
@@ -293,15 +293,18 @@ sub mysql_setup {
exit 0;
}
} elsif ( -r "/etc/mysql/debian.cnf" and $doremote == 0 ){
- # It's a debian system, use the maintenance account
+ # We have a debian maintenance account, use it
$mysqllogin = "--defaults-file=/etc/mysql/debian.cnf";
my $loginstatus = `mysqladmin $mysqllogin ping 2>&1`;
- unless ($loginstatus =~ /mysqld is alive/) {
+ if ($loginstatus =~ /mysqld is alive/) {
+ goodprint "Logged in using credentials from debian maintenance account.\n";
+ return 1;
+ } else {
badprint "Attempted to use login credentials from debian maintenance account, but they failed.\n";
exit 0;
}
} else {
- # It's not Plesk, we should try a login
+ # It's not Plesk or debian, we should try a login
my $loginstatus = `mysqladmin $remotestring ping 2>&1`;
if ($loginstatus =~ /mysqld is alive/) {
# Login went just fine

0 comments on commit 27f1454

Please sign in to comment.