Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restore unsaved MySQL Workbench scripts?

I had a bunch of unsaved scripts open. Today I restarted MySQL Workbench, there was an error message and now the scripts are gone. Is there a way to restore them somehow?

like image 489
Lurtz Avatar asked Feb 06 '23 23:02

Lurtz


2 Answers

You can try to find your script in History Output. Check this answer: MySql workbench query history ( last executed query / queries ) i.e. create / alter table, select, insert update queries

like image 151
avenir-arcadius Avatar answered Feb 19 '23 20:02

avenir-arcadius


If the save snapshot option is enable (this can be done by --> Edit>Preferences>SQL Editor>Save snapshot of open editors on close) then you can find the data in \%APPDATA%\MySQL\Workbench\log\sql_actions_unconnected.log. It is a log file, you can copy your code and paste it in a code editor which would put the code in the right format

like image 36
nunnithan Avatar answered Feb 19 '23 20:02

nunnithan