Skip to content

Instantly share code, notes, and snippets.

@nikolai-wolterstorff
Last active February 4, 2021 20:50
Show Gist options
  • Select an option

  • Save nikolai-wolterstorff/6d9510a92931ad98b6f6c40e3b2b5f6a to your computer and use it in GitHub Desktop.

Select an option

Save nikolai-wolterstorff/6d9510a92931ad98b6f6c40e3b2b5f6a to your computer and use it in GitHub Desktop.
MySQL 8 Log Notes
---- General Log (All Queries Executed) ----
-- show variables like '%general%'; -- returns variables "general_log" and "general_log_file"
-- show variables like '%log_output%'; -- shows if "log_output" is going to FILE, TABLE or both
-- SET GLOBAL general_log = 1; -- enable general log
-- SET GLOBAL general_log = 0; -- disable general log
-- SET GLOBAL log_output = 'TABLE'; -- sets general log to table mysql.general_log
-- SET GLOBAL log_output = 'FILE'; -- sets general log to file specified by "general_log_file"
-- select general logs, and display argument as text (stored as blob)
SELECT
*,
CONVERT(argument USING utf8)
FROM mysql.general_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment