summaryrefslogtreecommitdiffstats
path: root/plugins/check_mysql.c
diff options
context:
space:
mode:
authorwaja <waja@users.noreply.github.com>2023-06-28 14:39:09 (GMT)
committerGitHub <noreply@github.com>2023-06-28 14:39:09 (GMT)
commit103217831e07f26cead065985d0d007292ffd7ea (patch)
tree418829165611b9da69b19e2bcd0c135bf08962ab /plugins/check_mysql.c
parentf6f2ba34c713b5bc65936af836be24ebc74faf46 (diff)
parentb24eb7f46ac8667324efd818c01d68d5a1376c89 (diff)
downloadmonitoring-plugins-103217831e07f26cead065985d0d007292ffd7ea.tar.gz
Merge branch 'master' into compiler_warning_part_3
Diffstat (limited to 'plugins/check_mysql.c')
-rw-r--r--plugins/check_mysql.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c
index 0cba50e..91e150f 100644
--- a/plugins/check_mysql.c
+++ b/plugins/check_mysql.c
@@ -138,7 +138,10 @@ main (int argc, char **argv)
138 mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers); 138 mysql_ssl_set(&mysql,key,cert,ca_cert,ca_dir,ciphers);
139 /* establish a connection to the server and error checking */ 139 /* establish a connection to the server and error checking */
140 if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) { 140 if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,db,db_port,db_socket,0)) {
141 if (ignore_auth && mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR) 141 /* Depending on internally-selected auth plugin MySQL might return */
142 /* ER_ACCESS_DENIED_NO_PASSWORD_ERROR or ER_ACCESS_DENIED_ERROR. */
143 /* Semantically these errors are the same. */
144 if (ignore_auth && (mysql_errno (&mysql) == ER_ACCESS_DENIED_ERROR || mysql_errno (&mysql) == ER_ACCESS_DENIED_NO_PASSWORD_ERROR))
142 { 145 {
143 printf("MySQL OK - Version: %s (protocol %d)\n", 146 printf("MySQL OK - Version: %s (protocol %d)\n",
144 mysql_get_server_info(&mysql), 147 mysql_get_server_info(&mysql),
@@ -551,7 +554,7 @@ print_help (void)
551 printf (" %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds")); 554 printf (" %s\n", _("Exit with CRITICAL status if slave server is more then INTEGER seconds"));
552 printf (" %s\n", _("behind master")); 555 printf (" %s\n", _("behind master"));
553 printf (" %s\n", "-l, --ssl"); 556 printf (" %s\n", "-l, --ssl");
554 printf (" %s\n", _("Use ssl encryptation")); 557 printf (" %s\n", _("Use ssl encryption"));
555 printf (" %s\n", "-C, --ca-cert=STRING"); 558 printf (" %s\n", "-C, --ca-cert=STRING");
556 printf (" %s\n", _("Path to CA signing the cert")); 559 printf (" %s\n", _("Path to CA signing the cert"));
557 printf (" %s\n", "-a, --cert=STRING"); 560 printf (" %s\n", "-a, --cert=STRING");