cactiez使用mysql資料庫出現以下報錯:“[ERROR] /usr/sbin/mysqld”

來源:互聯網
上載者:User

標籤:cacti   should be repaired   

在查看cactiez發現登入不上去,登入上去發現磁碟空間不足了,最後發現mysql報錯日誌高達10G,通過日誌發現:

[[email protected] bin]# tail -f /var/log/mysqld.log2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired2018-03-02 15:54:17 31645 [ERROR] /usr/sbin/mysqld: Table ‘./cacti/poller_item‘ is marked as crashed and should be repaired

而且不斷快速的增長,通過日誌發現是cacti的這張表出現了錯誤,經過,排查經過修複表結構,報錯結束,以下是修複過程。
通過使用 mysqlcheck --auto-repair --databases cacti -u root -p 來進行修複。

[[email protected] bin]#  mysqlcheck --auto-repair --databases cacti -u root -pEnter password: cacti.cdef                                         OKcacti.cdef_items                                   OKcacti.colors                                       OKcacti.data_input                                   OKcacti.data_input_data                              OKcacti.data_input_fields                            OKcacti.data_local                                   OKcacti.data_template                                OKcacti.data_template_data                           OKcacti.data_template_data_rra                       OKcacti.data_template_rrd                            OKcacti.graph_local                                  OKcacti.graph_template_input                         OKcacti.graph_template_input_defs                    OKcacti.graph_templates                              OKcacti.graph_templates_gprint                       OKcacti.graph_templates_graph                        OKcacti.graph_templates_item                         OKcacti.graph_tree                                   OKcacti.graph_tree_items                             OKcacti.host                                         OKcacti.host_graph                                   OKcacti.host_snmp_cache                              OKcacti.host_snmp_query                              OKcacti.host_template                                OKcacti.host_template_graph                          OKcacti.host_template_snmp_query                     OKcacti.plugin_config                                OKcacti.plugin_db_changes                            OKcacti.plugin_hooks                                 OKcacti.plugin_realms                                OKcacti.poller                                       OKcacti.poller_command                               OKcacti.poller_itemwarning  : Table is marked as crashedwarning  : 2 clients are using or haven‘t closed the table properlyerror    : Unexpected byte: 0 at link: 95080error    : Corruptcacti.poller_output                                OKcacti.poller_reindex                               OKcacti.poller_time                                  OKcacti.rra                                          OKcacti.rra_cf                                       OKcacti.settings                                     OKcacti.settings_graphs                              OKcacti.settings_tree                                OKcacti.snmp_query                                   OKcacti.snmp_query_graph                             OKcacti.snmp_query_graph_rrd                         OKcacti.snmp_query_graph_rrd_sv                      OKcacti.snmp_query_graph_sv                          OKcacti.user_auth                                    OKcacti.user_auth_perms                              OKcacti.user_auth_realm                              OKcacti.user_log                                     OKcacti.version                                      OKcacti.weathermap_auth                              OKcacti.weathermap_data                              OKcacti.weathermap_groups                            OKcacti.weathermap_maps                              OKcacti.weathermap_settings                          OKRepairing tablescacti.poller_iteminfo     : Wrong bytesec:   0-  0-  0 at 20912; Skippedinfo     : Found block with too small length at 87732; Skippedinfo     : Wrong bytesec:   0-  0-  0 at 21096; Skippedinfo     : Wrong bytesec:  57- 48- 57 at 21164; Skippedinfo     : Wrong bytesec:  46- 49- 48 at 28040; Skippedinfo     : Found block that points outside data file at 92696info     : Wrong bytesec:   0-  0-  0 at 20884; Skippedinfo     : Found block with too small length at 104116; Skippedinfo     : Wrong bytesec:   0-  0-  0 at 27264; Skippedinfo     : Wrong bytesec:   0-  0-  0 at 28208; Skippedinfo     : Wrong bytesec:   0-  0-  0 at 27980; Skippedinfo     : Wrong block with wrong total length starting at 108504info     : Found block with too small length at 109952; Skippedinfo     : Wrong block with wrong total length starting at 112812info     : Wrong bytesec:   0-  0-  0 at 21132; Skippedinfo     : Wrong block with wrong total length starting at 114852info     : Wrong bytesec:  46- 49- 48 at 28012; Skippedinfo     : Found block with too small length at 117068; Skippedinfo     : Wrong block with wrong total length starting at 117292info     : Wrong bytesec:   0-  0-  0 at 9320; Skippedinfo     : Wrong bytesec:  49- 46- 49 at 28360; Skippedinfo     : Wrong block with wrong total length starting at 120876info     : Wrong block with wrong total length starting at 121468info     : Wrong bytesec:  46- 49- 46 at 28304; Skippedinfo     : Wrong block with wrong total length starting at 124488info     : Wrong block with wrong total length starting at 125820warning  : Number of rows changed from 652 to 624status   : OK

再次查看日誌:

[email protected] bin]# tail -f /var/log/mysqld.log2018-03-02 16:01:53 1824 [Note] InnoDB: Waiting for purge to start2018-03-02 16:01:53 1824 [Note] InnoDB: 5.6.37 started; log sequence number 14982631096442018-03-02 16:01:53 1824 [Note] Server hostname (bind-address): ‘*‘; port: 33062018-03-02 16:01:53 1824 [Note] IPv6 is available.2018-03-02 16:01:53 1824 [Note]   - ‘::‘ resolves to ‘::‘;2018-03-02 16:01:53 1824 [Note] Server socket created on IP: ‘::‘.2018-03-02 16:01:53 1824 [Note] Event Scheduler: Loaded 0 events2018-03-02 16:01:53 1824 [Note] /usr/sbin/mysqld: ready for connections.Version: ‘5.6.37‘  socket: ‘/var/lib/mysql/mysql.sock‘  port: 3306  MySQL Community Server (GPL)2018-03-02 16:01:54 1824 [Warning] IP address ‘172.20.66.26‘ could not be resolved: Name or service not known

錯誤得到解決了。

cactiez使用mysql資料庫出現以下報錯:“[ERROR] /usr/sbin/mysqld”

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.