defaults-file

Hi All,

I’m trying to use the /etc/nagios/mysql.cnf defaults file but I can’t find an example of what the format of this file should be. I’ve tried:


-H localhost
-l root
-p ‘my_pass’

I’ve also tried the options on a single line:

-H localhost -l root -p ‘my_pass’

but both give an error message of:
error: Found option without preceding group in config file: /etc/nagios/mysql.cnf at line:

I’m just testing by calling the plugin directly:
/usr/lib64/nagios/plugins/pmp-check-mysql-replication-running

Any help appreciated.

Thanks,
Peter

Never mind - got it sorted. For anyone who runs into the same problem it needs to be in the format used by the MySQL client. IE.

[client]
user=root
password=my_pass

Yes, /etc/nagios/mysql.cnf is the same format as .my.cnf or my.cnf.


harry