Check History of Executed Queries in MySQL Easily!

The MySQL Query History feature of dbForge Studio for MySQL allows you to quickly get execution statistics and history for SQL queries. Read the article to find out how to set up and use the feature.

MySQL Query History keeps you updated about all executed MySQL queries:

  • Check MySQL query history and be aware of who performs queries
  • Access and review the full text of executed MySQL queries
  • Customize executed MySQL queries and run them again, if necessary
  • Export the MySQL Query History to CSV. Note that this feature is available for all the editions, except Express
  • Filter executed MySQL queries to find required ones faster

Set up the MySQL Query History

To customize the MySQL Query History behavior, click Options in the Tools menu. Then, navigate to Environment -> Documents -> Execution History.

The window allows you to:
  • Enable/disable tracking of the MySQL Query History
  • Set up the number of days to store executed queries
  • Configure maximum script size to store
  • Customize output of the MySQL Query History at startup
  • Specify the location of the folder storing the MySQL Query History
  • Clear the MySQL Query History

How to check MySQL query history

To open the Execution History window, click Execution History on the SQL toolbar. Alternatively, point to Other Windows in the View menu, and then click Execution History. You can also press CTRL, ALT, H to open the Execution History window.

See the detailed history of executed queries

The Execution History window displays a list of executed queries with the following details:

  • Execution status indicating whether a query is executed successfully, or not
  • Query Text
  • Query size in bytes
  • Execution timestamp
  • Query execution time
  • Name of the query file
  • Name of the sever against which a query is executed
  • Name of the database against which a query is executed
  • Name of the user who executes a query
Also, the window displays DDL of the selected query.
Execution window

How to show the history of specific queries

To quickly find a required MySQL query in the list, you can:

  • Type the search string into the Search box and specify the query execution time span
  • Sort, group, and filter execution data by columns

Edit and execute commands from the history log

To edit or re-execute an executed query, you can:

  • Right-click a query in the list and click To new SQL window or To clipboard. Depending on your choice, the selected query will be opened in a new SQL window, or copied to clipboard
  • Right-click anywhere in the DDL text section of the Execution History window, and select Edit on the shortcut menu. The query will open in a new SQL window, where you can edit and re-execute it

Get the history of executed queries in MySQL in one tool!

As you can see, there is nothing easier than tracking executed MySQL queries with the MySQL Query History feature of the best MySQL IDE for Windows by Devart. You can customize the MySQL Query History behavior up to your needs, sort, group, and filter the query list as well as edit and re-execute the required MySQL query.


dbForge Studio for MySQL offers a query history tool with an intuitive and user-friendly drag-and-drop interface. MySQL Query History allows you to have a report on performed queries in one place that you can access at any time. Using the feature, you can modify already executed MySQL queries and reuse them again.

Along with MySQL Query History, dbForge Studio for MySQL provides a lot of useful and intelligent database development and management tools and capabilities.

dbForge Studio for MySQL

The most intelligent MySQL management tool

Availability in the editions of dbForge Studio for MySQL


Executed queries history