I have seen a couple other posts about this subject, but they don't appear to be answered.  I am attempting to use the check_mysql plugin from 1.4.13 (plugin version 2034) with mysql client libraries from mysql 5.1.  I don't want to pass the password via -p (whether it be through a $USER$ variable or not), but the plugin doesn't seem to see the password= value in the .my.cnf file present in ~nagios.<br>
<br>This is being attempted on Sun SPARC Solaris 10.  I have run a truss on the check_mysql command, and it certainly seems to be reading the ~/.my.cnf file that nagios seems to have (I see it open and read /usr/local/nagios/.my.cnf).  I have even attempted to put the password in /etc/my.cnf in the [client] section, but no go (not that I'd want to run that way anyway).  I am able to use the mysql client directly from the command line, and it reads the .my.cnf file without issue:<br>
<br>Examples:<br><br>(as user nagios)<br>$ mysql -h <hostip><br>Welcome to the MySQL monitor.  Commands end with ; or \g.<br>Your MySQL connection id is 54<br>Server version: 5.0.45-log MySQL Community Server (GPL)<br>
<br>Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br><br>mysql><br><br>Result:  mysql client can connect to the server without issue<br><br>$ /usr/local/nagios/libexec/check_mysql -H <hostip><br>
Access denied for user 'nagios'@'<monitor server hostname>' (using password: NO)<br><br>Has anyone run into this and found a way to make it work?<br><br>Thank You<br>