0
我试图设置ntopng
(在raspbian上)与MySQL中的持久存储。我已经添加下面的行ntopng.confntopng和mysql的依赖
--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连接并启动服务。
我猜测,在暴发户期间,ntopng
正在MySQL之前运行,并无法找到一个活动的守护进程。任何方式我可以确保ntopng
在MySQL之后启动?