Show Processlist

from the Artful MySQL Tips List

It shows all open MySQL threads. This query shows more detail...
  t.processlist_id, t.processlist_user,
  t.processlist_host, t.processlist_db, t.processlist_command,
  t.processlist_time, t.processlist_state, t.thread_id, t.type,,
  t.parent_thread_id, t.instrumented, t.processlist_info, a.attr_value 
from performance_schema.threads t 
left join performance_schema.session_connect_attrs a 
       on t.processlist_id = a.processlist_id 
      and (a.attr_name is null or a.attr_name = 'program_name') 
where t.type <> 'background' ;
Since 8.0.23, this info is available at the OS level in Linux, Windows and macOS.

Last updated 18 Mar 2022

Return to the Artful MySQL Tips page