Nagios/MySQL 错误

发布于 2024-10-07 14:43:24 字数 1844 浏览 3 评论 0原文

我收到来自 Nagios 的停机警报,称主机上的 mysql 已关闭。我登录主机,在mysql error.log文件中发现如下错误。解决此问题的正确步骤是什么?

root@ubuntu:/var/log# tail -f mysql/error.log
101202 11:09:21 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:09:21  InnoDB: Started; log sequence number 0 44233
101202 11:09:21 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:09:21 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)
101202 11:09:51 [Note] Plugin 'FEDERATED' is disabled.
                       /usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' 
                       (errno: 13)
101202 11:09:51 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:09:52  InnoDB: Started; log sequence number 0 44233
101202 11:09:52 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:09:52 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)
101202 11:10:22 [Note] Plugin 'FEDERATED' is disabled.
                       /usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' 
                       (errno: 13)
101202 11:10:22 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:10:22  InnoDB: Started; log sequence number 0 44233
101202 11:10:22 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:10:22 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)

Ireceived a downtime alert from Nagios that mysql was down on a host. I logged in to the host and found the following error in the mysql error.log file. What are the proper steps to troubleshoot this?

root@ubuntu:/var/log# tail -f mysql/error.log
101202 11:09:21 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:09:21  InnoDB: Started; log sequence number 0 44233
101202 11:09:21 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:09:21 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)
101202 11:09:51 [Note] Plugin 'FEDERATED' is disabled.
                       /usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' 
                       (errno: 13)
101202 11:09:51 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:09:52  InnoDB: Started; log sequence number 0 44233
101202 11:09:52 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:09:52 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)
101202 11:10:22 [Note] Plugin 'FEDERATED' is disabled.
                       /usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' 
                       (errno: 13)
101202 11:10:22 [ERROR] Can't open the mysql.plugin table. Please run 
                        mysql_upgrade to create it.
101202 11:10:22  InnoDB: Started; log sequence number 0 44233
101202 11:10:22 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' 
                        (errno: 13)
101202 11:10:22 [ERROR] Fatal error: Can't open and lock privilege tables: 
                        Can't find file: './mysql/host.frm' (errno: 13)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随梦而飞# 2024-10-14 14:43:24

找出 MySQL 找不到其表的原因。进入MySQL数据目录并查找mysql子目录(对应于mysql数据库,其中包含用户、进程、权限等内容)。也许有人删除了 mysql 数据库。也许有人用指向错误数据目录的文件覆盖了您的 my.cnf 配置文件。

Figure out why MySQL can't find its tables. Go to the MySQL data directory and look for the mysql subdirectory (corresponding to the mysql database which contains things like users, procs, privileges, etc.). Perhaps someone deleted the mysql database. Perhaps someone overwrote your my.cnf configuration file with one pointing to the wrong data directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文