ntopng和mysql依赖关系
我正在尝试在MySQL中使用持久存储设置ntopng和mysql依赖关系,mysql,raspbian,raspberry-pi3,upstart,Mysql,Raspbian,Raspberry Pi3,Upstart,我正在尝试在MySQL中使用持久存储设置ntopng(在raspbian上)。我在ntopng.conf中添加了以下行 --dump-flows=mysql;localhost;ntopng;flows;root;root 启动时,我发现ntopng已退出,因为它无法连接到数据库 ---snippet from /var/log/ntopng/ntopng.log------------ 28/Dec/2016 09:50:03 [MySQLDB.cpp:573] Attempting to
ntopng
(在raspbian上)。我在ntopng.conf中添加了以下行
--dump-flows=mysql;localhost;ntopng;flows;root;root
启动时,我发现ntopng已退出,因为它无法连接到数据库
---snippet from /var/log/ntopng/ntopng.log------------
28/Dec/2016 09:50:03 [MySQLDB.cpp:573] Attempting to connect to MySQL for interface eth0...
28/Dec/2016 09:50:03 [MySQLDB.cpp:602] ERROR: Failed to connect to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)[localhost:root]
28/Dec/2016 09:50:03 [MySQLDB.cpp:79] ERROR: Unable to connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
28/Dec/2016 09:50:03 [main.cpp:279] ERROR: Unable to create database schema, quitting
----end of snippet--------------
但是在启动之后,如果我运行'sudo service ntopng restart'
我发现ntopng
连接到MySQL并启动服务
我猜在upstart期间,
ntopng
在MySQL之前运行,无法找到活动的守护进程。我可以确保ntopng
在MySQL之后启动吗?有可能在您提出问题后发生了版本更改,但我成功地将以下行放置在/etc/ntopng/ntopng.conf中(我已经使用了
、
、
、
和
的设置)
从单据上看,应采用以下格式:
-F "mysql;<server>;<database>;<table>;<user>;<password>"
-F“mysql;”
这显然与上面的稍有不同(尽管--dump flows
应该可以替换为-F
)。您提到的等号可能是一个空格,参数的后一部分用语音标记括起来
-F "mysql;<server>;<database>;<table>;<user>;<password>"