Can you please confirm that you want to send a mail when mysql is down or when it is alive? The OP suggested you wanted to send a mail if mysql was alive, but the post quoted above suggests the...
Type: Posts; User: spynappels; Keyword(s):
Can you please confirm that you want to send a mail when mysql is down or when it is alive? The OP suggested you wanted to send a mail if mysql was alive, but the post quoted above suggests the...
The OP said he wanted an email sent if the mysqld is alive, counterintuitive but there you go...
Anyway, if the mail is to contain the results of the ping command, another option would be:
...
Are you sure there is more than one line in the output? On my server the output is a single line:
stefan@fileserver:~$ mysqladmin -u root -p ping
Enter password:
mysqld is alive...