I am new to Mysql server, I use the below query to see what are all processes or queries that users are currently executing.


I needed to check those processes, which users executed in past. like those processes which were executed and they got completed or aborted.

Is there a way to check the already executed processes via any query in MysqL server ?

  • I think you are going to have to process the logs to get this info, assuming you have the right onces turned on
    – RiggsFolly
    Apr 1, 2021 at 9:26
  • This question has nothing to do with programming, therefore it is off topic here on SO. The DBA sister site of SO provides help with questions on database internals like this one.
    – Shadow
    Apr 1, 2021 at 9:39
  • @Shadow I disagree here. SQL queries are also programing, or else every single SQL question would be on DBA site, right ?
    – Marc Alff
    Apr 1, 2021 at 9:42
  • @MarcAlff this is not about sql queries. This is about logging and configuration of mysql.
    – Shadow
    Apr 1, 2021 at 11:42

1 Answer 1


In MySQL, queries executes in the past can be seen in the general log.

See the reference manual: https://dev.mysql.com/doc/refman/8.0/en/query-log.html

  • Marc Alff, Thanks for the reference, after reading this post, I guess its not as straightforward as listing full processlist. For now I shall accept your post as answer and close this question.
    – mrsorrted
    Apr 1, 2021 at 10:02
  • BUT... You had to have the general log turned on!
    – Rick James
    Apr 1, 2021 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.