Usually MySQL workbench would load up all existing SQL tabs whenever I clicked on connection.
Today I tried and it is not loading my existing session back and I don't have any backup of my SQL code I wrote on workbench.
Is there any way to retrieve the session back or restore the last session with all the TABS?
I found this Googling as was also looking for code I'd neglected to save before closing Workbench. It wasn't in the sql_workspaces
but I found it logs all queries actually executed in this file and was able to pull what I needed from there:
\%APPDATA%\MySQL\Workbench\log\sql_actions_unconnected.log
If you use a Mac and have TimeMachine I found that I could go back to the old version of the folder where it was stored and restore
~[user]/Library/Application Support/MySQL/Workbench/sql_workspaces/
Each directory below that is an instance of a saved work environment and restoring the directory allowed Workbench to reopen it when I reopened the connection. Phew!
(Library is a hidden folder).
Enable Edit>Preferences>SQL Editor>Save snapshot of open editors on close
.
Even with this option checked, I experienced your problem with Workbench 6.0.X so I updated to latest version (6.3.X) and it was solved. I think there was a bug.
If the save snapshot option is enable then you can find the data in \%APPDATA%\MySQL\Workbench\log\sql_actions_unconnected.log
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With