Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ntopng和mysql依赖关系_Mysql_Raspbian_Raspberry Pi3_Upstart - Fatal编程技术网

ntopng和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

我正在尝试在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 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>"