ITPub博客

首页 > 应用开发 > IT综合 > ndo2db: mysql_error: ‘Unknown column ‘importance’ in ‘field list”

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

原创 IT综合 作者:Michael_DD 时间:2015-06-04 10:17:31 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/29500582/viewspace-1685133/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-02-22

  • 博文量
    326
  • 访问量
    2671974