Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySql workbench query history ( last executed query / queries ) i.e. create / alter table, select, insert update queries

Want to see last executed queries in MySql Workbench whether its

create / alter table query

select / insert / update query or any query list.

in short want to see history of all queries

like image 419
murtaza.webdev Avatar asked Oct 28 '14 13:10

murtaza.webdev


People also ask

How do I stop a query execution in MySQL Workbench?

Run the following command: mysql> SELECT GROUP_CONCAT(CONCAT('KILL ',id,';') SEPARATOR ' ') FROM information_schema. processlist WHERE user <> 'system user'; This will kill all your MySQL queries.

Which of the following tool in MySQL Workbench will run SQL queries?

The SQL query secondary tab opens by default when you make a connection to a server from the Home screen. It includes a query editor area and a toolbar. You can enter SQL statements directly into the query editor area.


2 Answers

From the bottom panel, change "Action Output" to "History" and then choose the appropriate date.

Alternatively, the SQL statement history is stored in text files under two locations:

  • sql_history/yyyy-mm-dd e.g., sql_history/2015-04-01: Full Workbench SQL history for all MySQL connections
  • log/sql_actions_.log*: SQL history execution results, but without the data, and separated per MySQL connection

The location of these files depends on your system. For additional details, see MySQL Workbench Settings and Log Files

In both cases, you will see the query history.

enter image description here

like image 197
Philip Olson Avatar answered Oct 19 '22 18:10

Philip Olson


C:\Users[WinUser]\AppData\Roaming\MySQL\Workbench\sql_history

you find a log file for each day. It includes manual and automated queries from workbench (e.g. UPDATES via edit in Table)

like image 15
Alex Avatar answered Oct 19 '22 19:10

Alex