diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-17 23:15:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-17 23:15:59 +0200 |
commit | d3e07d2b5734149c1314cb98b48dd1adebd62686 (patch) | |
tree | a924b49927ae1925a7e0893d31e0c9c6abd3228e /plugins/check_mysql.c | |
parent | 495c4c9adfa482303b31cdac7d28adda82d2d2ed (diff) | |
parent | 2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff) | |
download | monitoring-plugins-d3e07d2.tar.gz |
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins/check_mysql.c')
-rw-r--r-- | plugins/check_mysql.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index 0cba50e6..91e150fb 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"); |