Created
January 27, 2023 18:57
-
-
Save phnahes/3d6d6bda4398e3ae026d9673a147d808 to your computer and use it in GitHub Desktop.
Enable / Disable and Read MYSQL "general_log"
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
-- To Enable Query logging on the database | |
set global general_log = 1; | |
set global log_output = 'table' | |
-- For turn Hex readable: | |
select a.*, convert(a.argument using utf8) from mysql.general_log a; | |
-- To Disable Query logging on the database | |
set global general_log = 0; | |
-- To Clear query logs without disabling | |
TRUNCATE mysql.general_log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment