Hello, I have installed syslog-ng3 from ports fine and logging to files is working great. However when i implement mysql logging it breaks. I have tried a few how-to's and looked over the documentation but can see where I am going wrong. I have tried both host="localhost" and host="127.0.0.1" for socket and tcp uses, same error.
The error received is...
Here is the config for the destination d_sql
The error received is...
Code:
Starting syslog_ng.
Unable to initialize database access (DBI); rc='-1', error='No such file or directory (2)'
Error initializing dest driver; dest='d_sql', id='d_sql#0'
Error initializing message pipeline;
/usr/local/etc/rc.d/syslog-ng: WARNING: failed to start syslog_ng
Here is the config for the destination d_sql
Code:
destination d_sql {
sql(type(mysql)
host("localhost") username("syslog") password("passwd")
database("syslog")
table("logs")
columns("host", "facility", "priority", "level", "tag", "datetime", "program", "msg")
values("$HOST", "$FACILITY", "$PRIORITY", "$LEVEL", "$TAG", "$ISODATE", "$PROGRAM", "$MESSAGE")
indexes("host", "facility", "priority", "datetime", "program"));
};