ndo2db: mysql_error: ‘Unknown column ‘importance’ in ‘field list”

Michael_DD發表於2015-06-04
ndo2db: mysql_error: ‘Unknown column ‘importance’ in ‘field list”




問題描述:
解決方法執行  mysql-upgrade-2.0.0.sql(這個檔案在ndoutils-2.0.0/db/mysql-upgrade-2.0.0.sql這個位置。)


方法


mysl -uroot -p


mysql> use nagios;


mysql> source /home/anzhuangbao/ndoutils-2.0.0/db/mysql-upgrade-2.0.0.sql


如果soucre報如下錯誤


ERROR 1146 (42S02): Table ‘nagios.nagios_notifications’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_contactnotifications’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_contactnotificationmethods’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_logentries’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_acknowledgements’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_contacts’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_hosts’ doesn’t exist
ERROR 1146 (42S02): Table ‘nagios.nagios_services’ doesn’t exist
Query OK, 0 rows affected (0.00 sec)


Query OK, 0 rows affected (0.00 sec)


Query OK, 0 rows affected (0.00 sec)
Statement prepared


+——————————+
| INFO: Index does not exists. |
+——————————+
| INFO: Index does not exists. |
+——————————+
1 row in set (0.00 sec)


ERROR 1146 (42S02): Table ‘nagios.nagios_logentries’ doesn’t exist
Query OK, 0 rows affected, 1 warning (0.00 sec)


請將mysql-upgrade-2.0.0.sql裡所有nagios_修改為npc_


再次執行


mysql> source /home/anzhuangbao/ndoutils-2.0.0/db/mysql-upgrade-2.0.0.sql
Query OK, 0 rows affected (0.29 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.26 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.34 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (1.00 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.26 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.57 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (1.09 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.94 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected (0.00 sec)


Query OK, 0 rows affected (0.00 sec)


Query OK, 0 rows affected (0.00 sec)
Statement prepared


+——————————+
| INFO: Index does not exists. |
+——————————+
| INFO: Index does not exists. |
+——————————+
1 row in set (0.00 sec)


Query OK, 0 rows affected (0.69 sec)
Records: 0 Duplicates: 0 Warnings: 0


Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> \q
Bye


問題解決。


 


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1685133/,如需轉載,請註明出處,否則將追究法律責任。

相關文章