Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to set up some logging on my debian squeeze x64 mysql 5.1 Server:

1) logging when users logged in and logged off 2) logging only specific users commands

set up logging which will not slow down performance of mysql server or harddrives.

Is it possible to set logging only last month?

Is it possible to set up logging only in specific hours in a day?

I don't want gigabytes of useless logs, just logs of specific users in one file.

share|improve this question

You need MySQL 5.6 EE. With CE you could write your own audit plugin. Or use the poor man auditing with custom triggers and write your own retention routine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.