Skip to content

Instantly share code, notes, and snippets.

@jdeathe
Last active July 20, 2018 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdeathe/f924849f202183d12b819c68ff4f4654 to your computer and use it in GitHub Desktop.
Save jdeathe/f924849f202183d12b819c68ff4f4654 to your computer and use it in GitHub Desktop.
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