summaryrefslogtreecommitdiffstats
path: root/plugins/check_mysql.c
diff options
context:
space:
mode:
authorwaja <waja@users.noreply.github.com>2023-06-28 14:39:27 (GMT)
committerGitHub <noreply@github.com>2023-06-28 14:39:27 (GMT)
commit265a7c0ed8ccde7868bb7e77c44aecc403743c21 (patch)
tree3a02f6ce03e8f781dcfca22ee1f17817225a0ff9 /plugins/check_mysql.c
parentb96a8424f0ec6206238b650c2c63b4bd006ab43a (diff)
parentb24eb7f46ac8667324efd818c01d68d5a1376c89 (diff)
downloadmonitoring-plugins-265a7c0ed8ccde7868bb7e77c44aecc403743c21.tar.gz
Merge branch 'master' into compiler_warning_part_2refs/pull/1867/head
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");