How to set and get log in MySQL?
Using below MySQL statement, we can set and get the MySQL log:
For getting the log, we must need set global log using command as below:
SET global general_log = 1;
Now need execute command using storing output:
SET global log_output = 'table';
Now you can see the log using below query:
SELECT * FROM mysql.general_log;
If you want to disable log, then need to run below query:
SET global general_log = 0 ;
Comments
Post a Comment