syslog
Logging users to the MySQL error log
Submitted by Shinguz on Mon, 2010-02-15 16:18Problem
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
Submitted by Shinguz on Thu, 2010-01-07 10:20There are 2 different possible situations you can face when you have to deal with MySQL and syslog:
- MySQL is used as back-end for syslog to store the logging information. [6]
- 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].
