Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

MySQL : View Executed Queries on MySQL Server Log


It is often required to investigate the queries executed on MySQL Server Log for many reasons when debugging.

Set the Flags

SET GLOBAL log_output = 'TABLE';

SET GLOBAL general_log = 'ON';

Query the General Log

select event_time, CAST(argument AS CHAR(10000) CHARACTER SET utf8) from mysql.general_log order by event_time desc;

Above query will list the queries executed on the MySQL server with latest query first.

Note : Admin permission is required to execute the above query.

...



This post first appeared on Devdummy, please read the originial post: here

Share the post

MySQL : View Executed Queries on MySQL Server Log

×

Subscribe to Devdummy

Get updates delivered right to your inbox!

Thank you for your subscription

×