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.

1 Answer 1


You can enable general log by adding this line in my.cnf/my.ini file: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_general_log

[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. http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_log_output

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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