summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2005-10-13 09:55:31 (GMT)
committerM. Sean Finney <seanius@users.sourceforge.net>2005-10-13 09:55:31 (GMT)
commitf1cef328a6f38e4da3c33a7154a0e0b89f2daa5a (patch)
treeba578db595b100371e99e671ff0dfe0ca59acdf9
parent2a139ee92f015a341c2b54e89e993cecdceb06cc (diff)
downloadmonitoring-plugins-f1cef328a6f38e4da3c33a7154a0e0b89f2daa5a.tar.gz
check mysql now reads [client] defaults from my.cnf (debian bug #278817)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1244 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_mysql.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 20901e6..3194ece 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -65,6 +65,8 @@ main (int argc, char **argv)
65 /* initialize mysql */ 65 /* initialize mysql */
66 mysql_init (&mysql); 66 mysql_init (&mysql);
67 67
68 mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"client");
69
68 /* establish a connection to the server and error checking */ 70 /* establish a connection to the server and error checking */
69 if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) { 71 if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,NULL,0)) {
70 if (mysql_errno (&mysql) == CR_UNKNOWN_HOST) 72 if (mysql_errno (&mysql) == CR_UNKNOWN_HOST)