Skip to content

Instantly share code, notes, and snippets.

@lmeyer
Last active April 24, 2016 12:59
Show Gist options
  • Select an option

  • Save lmeyer/bf3d20aa7dd3bf2470497458e48ad513 to your computer and use it in GitHub Desktop.

Select an option

Save lmeyer/bf3d20aa7dd3bf2470497458e48ad513 to your computer and use it in GitHub Desktop.
View and enable mySQL logs
mysql> SHOW VARIABLES LIKE "general_log%";
+------------------+----------------------------+
| Variable_name | Value |
+------------------+----------------------------+
| general_log | OFF |
| general_log_file | /var/run/mysqld/mysqld.log |
+------------------+----------------------------+
mysql> SET GLOBAL general_log = 'ON';
tail -f /var/run/mysqld/mysqld.log
mysql> SET GLOBAL general_log = 'OFF';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment