Last active
February 4, 2021 20:50
-
-
Save nikolai-wolterstorff/6d9510a92931ad98b6f6c40e3b2b5f6a to your computer and use it in GitHub Desktop.
MySQL 8 Log Notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ---- 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