top of page

Capture queries in Mysql

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.

 
 
 

Recent Posts

See All
Split file by line number - Ubuntu

We can run the below command to split the large file in Ubuntu. split --numeric-suffixes=1 --additional-suffix=.csv -l 100 original.csv...

 
 
 

Comentarios


Follow Me

  • LinkedIn
  • Twitter
  • Facebook
  • YouTube
  • Instagram

©2021 by Bilal Usean. Proudly created with Wix.com

bottom of page