Last active
July 26, 2016 19:29
-
-
Save dungam/c99d10189c4e30c86d8a9af4d3f51dd5 to your computer and use it in GitHub Desktop.
Enable 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
-- you can enable the log by change my.cnf settings (not recommended) | |
-- you can make changes on demand via your sql program, e.g workbench (recommended) | |
-- run the following commands to enable logging on demand. | |
# specify location for your log. Mysql needs write access to the folder specified | |
set global general_log_file = '/var/log/mysql/mysql.log'; | |
# turn on login (1), turn off logging (0) | |
set global general_log = 1; | |
# see if your settings took effect | |
show variables like '%general_log%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment