Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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've been assigned to create a general log.

I need a log that captures what actions were taken, by whom, to the database. Regardless of whether it is a SELECT or an ALTER or etc. We need to keep track of everything that users have been doing to the database.

I have already created a general log to my localhost as a "mouse lab". However, there are no records inserted into the general log table.

What can you suggest I do? I'm using MySQL.

I'm losing myself on this, and I have no idea what to do anymore. I'm just a freshie, not even graduated.

share|improve this question

You can enable general log by adding this line in my.cnf/my.ini file:

[mysqld] general_log=1 also You can set General log output by changing your my.cnf/my.ini file (MySQL configuration file) to either TABLE or FILE if TABLE is choosen then server will log all queries in general_log table of mysql schema otherwise in FILE option it will log in a file path mentioned.

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.