[syslog-ng] Syslog-NG/MySQL question

Gergely Nagy algernon at balabit.hu
Fri Sep 7 13:00:43 CEST 2012


James McDonald <jmcdonald at LCE.com> writes:

> Thanks for the response.  I guess that means I was looking at older
> instructions for how to integrate MySQL and Syslog-NG.  I am having trouble
> getting syslog-ng to send logs to a MySQL db.   Have you ever done this?
> Could you try to help me figure out why I can't get syslog-ng and MySQL to
> communicate?  I can send any info that you may need to help.

Well, I used an SQL destination only briefly, and that was years ago,
but I believe the documentation was fairly good, and even had
examples. For example:

 http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.3-guides/syslog-ng-ose-v3.3-guide-admin-en.html/configuring_destinations_sql.html

I believe that's a fairly complete one with quite a lot of options set
and all that.

As to why it doesn't communicate, the debug logs should tell you a
lot. It can be anything from MySQL not listening to TCP (and thus
syslog-ng can't connect) through firewall issues to tables not
insufficient permissions.

Run syslog-ng with -Fvde, it will tell you which SQL commands failed and
why. It should also tell you why it could not connect, which, at worst,
will give you a hint. At the same time, looking at the mysql logs could
reveal the issue aswell.

And again, BalaBit support is happy to help with PE-related issues, they
can help you further in this case too.

-- 
|8]



More information about the syslog-ng mailing list