MySQL has a statement called “show processlist” to show you the running queries on your MySQL server.

How do I view MySQL history?

Show activity on this post. I would like to display my executed sql command history in my MYSQL Query Browser.
If you want to output to a log file:

  1. SET GLOBAL log_output = “FILE”;
  2. SET GLOBAL general_log_file = “/path/to/your/logfile. log”
  3. SET GLOBAL general_log = ‘ON’;

Does MySQL have a log?

MySQL Server has several logs that can help you find out what activity is taking place. By default, no logs are enabled, except the error log on Windows. (The DDL log is always created when required, and has no user-configurable options; see Section 5.4.

How do I log a SQL query?

Procedure

  1. From the workbench menu bar, click Window > Preferences > Database Retrieval Parameters > DB Retrieval Debug. …
  2. To start logging SQL queries, click Yes.
  3. To stop logging SQL queries, click No.
  4. To view details of the SQL queries in the DB Retrieval Debug view, click Open Debug View, then click OK.