Capture queries in Mysql
- Bilal Malik
- Jun 26, 2021
- 1 min read
We can check all the executed queries in Mysql using the below commands.
Enable Query Log:
SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'table';
Check Query Log:
SELECT * FROM mysql.general_log;
Disable Query Log:
SET GLOBAL general_log = 'OFF';
TRUNCATE mysql.general_log;
I hope it helps.
Comentarios