Skip to content

Instantly share code, notes, and snippets.

@karmanov
Last active August 29, 2015 14:00
Show Gist options
  • Save karmanov/11286640 to your computer and use it in GitHub Desktop.
Save karmanov/11286640 to your computer and use it in GitHub Desktop.
How to enable MySQL query monitoring

How to enable MySQL query monitoring

Do you need to monitor any SQL statements passing through your MySQL server? You would need to turn on the server logging. Edit your my.cnf file and add these:

log-output=FILE
general-log=1
general_log_file=mysql-general.log

You also need to restart the database server after these changes.

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