2010-12-14 7 views
1

Ich habe von Nagios eine Ausfallwarnung erhalten, dass mysql auf einem Host nicht aktiv war. Ich habe mich beim Host angemeldet und den folgenden Fehler in der Datei mysql error.log gefunden. Was sind die richtigen Schritte, um dies zu beheben?Nagios/MySQL-Fehler

[email protected]:/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) 
+0

Haben Sie die Dateipfade überprüft? –

Antwort

2

Herausfinden, warum MySQL seine Tabellen nicht finden kann. Gehen Sie zum MySQL-Datenverzeichnis und suchen Sie nach dem Unterverzeichnis mysql (das der mysql-Datenbank entspricht, die Dinge wie Benutzer, Prozeduren, Privilegien usw. enthält). Vielleicht hat jemand die mysql Datenbank gelöscht. Vielleicht hat jemand Ihre Konfigurationsdatei my.cnf überschrieben, wobei eine auf das falsche Datenverzeichnis zeigte.