Nagios monitor MySQL fixed from library: libmysqlclient.so.18:cannot Open shared object File:no such

Source: Internet
Author: User
<span id="Label3"></p><strong>to <strong>do MySQL slave time monitoring, must check_mysql the text, check when the Error:<br></strong></strong><span style="background-color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 0, 0);">error while loading shared Libraries:libmysqlclient.so.18:cannot open Shared object file:no such file or directory<br></span></span><br><strong><strong>1, error messages such as the Following:</strong></strong><br>[email protected] ~]#/usr/local/nagios/libexec/check_mysql-uadmin-p3306-s/data/mbdata/open/mysql.sock- h127.0.0.1-pxxxxx-d openshop-w 300-c 360<br>/usr/local/nagios/libexec/check_mysql:error while loading shared libraries:libmysqlclient.so.18:cannot open shared Object File:no such file or directory<br>[email protected] ~]#<br><br><strong><strong>2, run check_mysql--help see command, found also Not.</strong><p><strong></strong></p></strong><p><p><strong></strong><br></p></p><pre code_snippet_id="345323" snippet_file_name="blog_20140514_1_219514" name="code" class="javascript"><pre code_snippet_id="345323" snippet_file_name="blog_20140514_1_219514" name="code" class="javascript"></pre></pre><br><strong><strong>3. Check to see if the error libmysqlclient.so.18 file exists:<br></strong></strong>[email protected] ~]# find/-name libmysqlclient.so.18<br>/mysql-5.6.12/libmysql/libmysqlclient.so.18<br>/usr/local/mysql/lib/libmysqlclient.so.18<br><span style="color:#993399;">File Exists. But not Recognized.<p><p></p></p><p><p><br><br><br><strong>4, it could be a libmysqlclient problem.</strong><br>Search Mysqlclient Library Linkage Problem.</p></p><p><br>Find Article Address: Http://stackoverflow.com/questions/2080679/mysqlclient-library-linkage-problem<br>Find/etc/ld.so.conf.d/mysql-x86_64.conf such a configuration file, open to see<br>Cat/etc/ld.so.conf.d/mysql-x86_64.conf<br><br>[email protected] ~]# cat/etc/ld.so.conf.d/mysql-x86_64.conf<br>/usr/lib64/mysql<br><br>Go to the Folder/usr/lib64/mysql see what's in the File:<br>[email protected] ~]# Ll/usr/lib64/mysql<br>Total Dosage 3108<br>Lrwxrwxrwx. 1 root root 26 September libmysqlclient_r.so.16-libmysqlclient_r.so.16.0.0<br>-rwxr-xr-x. 1 root root 1595176 December 8 libmysqlclient_r.so.16.0.0<br>Lrwxrwxrwx. 1 root root 24 September libmysqlclient.so.16-libmysqlclient.so.16.0.0<br>-rwxr-xr-x. 1 root root 1582952 December 8 libmysqlclient.so.16.0.0<br><span style="background-color: rgb(255, 255, 102);"><span style="background-color: rgb(255, 255, 102);">There are some soft connections. And with a suffix that means so.16 and the Like. But there's no such thing as so.18, it doesn't seem to be connected here,<br>It may be necessary to make a soft connection to turn/usr/local/mysql/lib/libmysqlclient.so.18 into/usr/lib64/libmysqlclient.so.18,<br>To do the soft connection immediately: ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18, and then Check. Check success such as the following see:</span></span><br><br></p><pre code_snippet_id="345323" snippet_file_name="blog_20140514_2_2390295" name="code" class="python">[[email protected] ~]# Ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18[[email  protected] ~]# [[email protected] ~]# [[email protected] ~]#/usr/local/nagios/libexec/check_mysql-- Helpcheck_mysql v2.0 (nagios-plugins 2.0) Copyright (c) 1999-2014 nagios Plugin Development team<[email  Protected]>this program tests connections to a MySQL serverusage:check_mysql [-d database] [-h host] [-p port] [-s Soc ket] [-u user] [-p password] [-s] [-l] [-a cert] [-k key] [-c ca-cert] [-d ca-dir] [-l ciphers] [-f optfile] [ -g group]options:-h,--help Print Detailed help screen-v,--version print version Information--extra-opts=[sectio n][@file] Read options from an INI file. See https://www.nagios-plugins.org/doc/extra-opts.html for usage and examples...................................-l, --ssl Use SSL encryptation-c,--ca-cert=string path to CA signing the cert-a,--cert=string path to SSL certif Icate -k,--key=string path to private SSL key-d,--ca-dir=string path to ca directory-l,--ciphers=string List of V Alid SSL ciphers ..... ..... ..... ....... ....................... Send email to [email protected] if you had questions regarding useof this Software. To submit patches or suggest improvements, send email to[email protected][[email protected] ~]#</pre><br><strong><strong>5, continue running Check_mysql to Check.<br></strong></strong>[email protected] ~]#/usr/local/nagios/libexec/check_mysql-unagios-p3306-s-h127.0.0.1--password= ' [email protected] '/usr/local/mysql/mysql.sock-d test-w 60-c 100<br>Slave query error:access denied; Need (at least one's) the SUPER, REPLICATION CLIENT privilege (s) for this operation<br>[email protected] ~]#<br>Report an account error,<br>Check<br>Slave query error:access denied; Need (at least one's) the SUPER, REPLICATION CLIENT privilege (s) for this operation<br>Account error, enter MySQL interface to give Nagios account permissions<br>mysql> GRANT PROCESS, SUPER, REPLICATION CLIENT on * * to [e-mail protected] '% ' identified by ' [email protected] ';<br><br><strong><strong>6. Check Again<br></strong></strong>[email protected] ~]#/usr/local/nagios/libexec/check_mysql-unagios-p3306-s-hlocalhost--password= ' [email protected] '-s/usr/local/mysql/mysql.sock-d test-w 60-c 100<br>Slave io:yes Slave sql:no Seconds Behind Master: (null)<br><br>MySQL slave test failed. There is an error message:<span style="background-color: rgb(255, 255, 51);"><span style="background-color: rgb(255, 255, 51);">Slave io:yes Slave sql:no Seconds Behind Master: (null)</span></span><br><p><p>Go to MySQL form to see specific information</p></p><p><p></p></p><pre code_snippet_id="345323" snippet_file_name="blog_20140514_3_307934" name="code" class="sql">[[email protected] ~]# Mysqlwelcome to the MySQL Monitor. Commands End with; or \g.your MySQL connection ID is 23Server version:5.6.12-log Source distributioncopyright (c) $, Oracle and/or Its affiliates. All Rights Reserved. Oracle is a registered trademark of Oracle Corporation and/or Itsaffiliates. Other names trademarks of their respectiveowners. Type ' help ', ' or ' \h ' for Help. Type ' \c ' to clear the current input statement.mysql> show slave status\g*************************** 1. Row *************************** slave_io_state:waiting for master to send event Master_hos t:10.xx.3.xx Master_user:repl master_port:3306 connect_retry:60 master_log_file:mysql-bin.010294 read_master_log_pos:21764 Relay_log_file:mysql-relay-bi n.003125 relay_log_pos:91805 relay_master_log_file:mysql-bin.010275 slave_io_running: Yes Slave_sql_running:no Replicate_do_db:xx,xx_db,xxsystem replicate_ignore_db: Replicate_Do_Table:Replicate_Ignore_Table:Replicate_Wild_Do_Table:Replicate_Wild_Ignore_Table: last_errno:1590 last_error:the incident Lost_events occured on the Master. Message:error writing to the binary log skip_counter:0 exec_master_log_pos:91642 relay_log_space:1780004 Until_condition:none until_log_file:until_log_pos:0 Master_ssl_allowed:no Master_SSL_CA_File:Master_SSL_CA_Path:Master_SSL_Ce Rt:Master_SSL_Cipher:Master_SSL_Key:Seconds_Behind_Master:NULLMaster_SSL_Verify_Ser Ver_cert:no last_io_errno:0 last_io_error:last_sql_errno:1590 Last_sql_error:the incident LOST_events occured on the Master. Message:error writing to the binary log replicate_ignore_server_ids:master_server_id:71 master_uuid:9b0dcf62-29f4-11e3-9471-677b33903869 Master_Info_File:mysql.slave_master_info sql_delay:0 Sql_remaining_delay:null slave_sql_running_state:master_retry_count:86400 master_bind:last_io_error_timestamp:last_sql_error_timestamp:140512 11:29:54 Master _ssl_crl:master_ssl_crlpath:retrieved_gtid_set:executed_gtid_set:aut O_position:01 row in set (0.00 SEC) mysql></pre><br>About<span style="background-color: rgb(255, 255, 51);"><span style="background-color: rgb(255, 255, 51);">Slave io:yes Slave sql:no Seconds Behind Master: (null), participation blog:</span></span>http://blog.csdn.net/mchdba/article/details/25738991<p><p><br></p></p><p><p><strong>After 7,slave redo, the Check,slave state is normal again.</strong></p></p><p><p>#/usr/local/nagios/libexec/check_mysql-unagios-p3306-s-s/usr/local/mysql/mysql.sock-hlocalhost--password= ' [ Email protected] '-d test-w 60-c 100<br></p></p><p><p></p></p><pre code_snippet_id="345323" snippet_file_name="blog_20140514_4_3100380" name="code" class="sql"><pre code_snippet_id="345323" snippet_file_name="blog_20140514_4_3100380" name="code" class="sql">[email protected] ~]#/usr/local/nagios/libexec/check_mysql-unagios-p3306-s-s/usr/local/mysql/mysql.sock- Hlocalhost--password= ' [email protected] '-d test-w 60-c ' uptime:18431321 threads:3 questions:1447646 Slow queries:735 opens:18605 Flush tables:1 Open tables:214 </pre></pre><br><br><p><p></p></p> <p style="font-size:12px;"><p style="font-size:12px;">Copyright Notice: This article Bo master original Article. blog, not reproduced without Consent.</p></p> <p><p>Nagios monitor MySQL fixed from library: libmysqlclient.so.18:cannot Open shared object File:no such</p></p></span></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.