Skip navigation.
Home

Languages

RSS Feed FromDual on Linked In Recommend us on Xing Join us on Facebook Google+ Flickr Contact us

syslog

Logging users to the MySQL error log

Problem

A customer recently showed up with the following problem:

With your guidelines [1] I am now able to send the MySQL error log to the syslog and in particular to an external log server.
But I cannot see which user connects to the database in the error log.

How can I achieve this?

Idea

During night when I slept my brain worked independently on this problem and in the morning he had prepared a possible solution for it.

What came out is the following:

  • We create an UDF which allows an application to write to the MySQL error log.

MySQL reporting to syslog

There are 2 different possible situations you can face when you have to deal with MySQL and syslog:

  1. MySQL is used as back-end for syslog to store the logging information. [6]
  2. MySQL itself should report to the syslog.

In this blog article we look at the second situation: How can you make MySQL reporting to the syslog.

Since the version 5.1.20 MySQL is capable to log to the syslog [1], [2].

Syndicate content