Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to Enable MySQL Query Logging at Runtime

How to Enable MySQL Query Logging at Runtime

From the mysql client run:

mysql> SET GLOBAL general_log=true;
mysql> SET GLOBAL general_log_file='general.log';

After this queries will be logged to the named file located in the MySQL data directory. e.g. /var/lib/mysql/general.log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment