# defaults-file

**URL:** <https://forums.percona.com/t/defaults-file/3713>\
**Category:** Percona Monitoring Plugins\
**Created:** [August 29, 2014, 1:34pm UTC](https://forums.percona.com/t/defaults-file/3713 "2014-08-29T13:34:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phinds](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@phinds](https://forums.percona.com/u/phinds)\
**Post date:** [August 29, 2014, 1:34pm UTC](https://forums.percona.com/t/defaults-file/3713/1 "2014-08-29T13:34:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![phinds](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@phinds](https://forums.percona.com/u/phinds)\
**Post date:** [August 29, 2014, 2:45pm UTC](https://forums.percona.com/t/defaults-file/3713/2 "2014-08-29T14:45:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![weber](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@weber](https://forums.percona.com/u/weber)\
**Post date:** [September 1, 2014, 4:27am UTC](https://forums.percona.com/t/defaults-file/3713/3 "2014-09-01T04:27:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![baba11](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@baba11](https://forums.percona.com/u/baba11)\
**Post date:** [November 10, 2014, 4:17am UTC](https://forums.percona.com/t/defaults-file/3713/4 "2014-11-10T04:17:28Z")

</div>

* * *

harry
