Check the currently running query in MariaDB / MySQL

Check the currently running query in MariaDB / MySQL

Show the process with the process list command including sleeping and running

SHOW [FULL] PROCESSLIST 

SHow PROCESSLIST \G

Check the currently running query in the info column:



select * from information_schema.PROCESSLIST p where info is not null;

Enable the trace for running SQL query by enabling general log :


set global log_output = 'table';
set global general_log = 'on';

select * from mysql.general_log;

select event_time as time,
    user_host,
    thread_id,
    server_id,
    command_type,
    argument
from mysql.general_log
order by event_time desc
limit 1;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.