You are here

MySQL Workbench 5.2 GA Portable

6 posts / 0 new
Last post
PatPeter
Offline
Last seen: 1 year 8 months ago
Joined: 2010-09-20 15:32
MySQL Workbench 5.2 GA Portable

MySQL Workbench works pretty well on a flash drive, the only problem is that it saves a considerable amount of user data to the computer:

C:\Users\%USERNAME%\AppData\Roaming\MySQL\Workbench

Folders:
libraries
modules
scripts
snippets

Files:
connections.xml
server_instances.xml
shell_bookmarks.txt
shell_history.txt
starters_settings.xml
user_starters.xml
wp_options.xml
wb_state.xml

The noinstall archive works best for running off a flash drive:

http://dev.mysql.com/downloads/workbench/5.2.html

I could not find an option in Workbench's settings to specify the AppData directory.

Electronjockey
Offline
Last seen: 12 years 9 months ago
Joined: 2010-03-22 15:35
success

After doing some research, I've found that the workbench sets C:\Users\%USERNAME%\AppData\Roaming\MySQL\Workbench based on the USERPROFILE environment variable. To make it portable I created a batch file in the MySQLWorkbench directory with the following contents:

SET USERPROFILE=%CD%
START MySQLWorkbench.exe

This has the result of creating/referencing the files in:
%CD%\AppData\Roaming\MySQL\Workbench

So I'm sure it'd be easy enough to make a laucher that does the same. And it makes more sense to me to do it this way rather than checking for exisiting files and doing a backup and restore, as one wouldn't have to worry about an unclean exit.

The one thing to be aware of is that the windows port of the workbench depends on the .Net framework. So not likely there will be an official portableapps release.
On that note, it'd be nice to have portableapps.net site for .net apps. I realize that the .Net framework itself isn't portable (though silverlight may hold some promise in that regard) but I work almost exclusively on systems that have the framework installed and have customized a handful of apps to PAF.

I did this using the MySQL Workbench 5.2.30 CE "no install" zip package on Windows 7.

HugoWZ
Offline
Last seen: 12 years 11 months ago
Joined: 2011-04-29 04:06
A small enhancement for the Start-Script

Good Job.
A small enhancement of the start script to create the
directory "%CD%\AppData\.." if it not exists.

@echo off
REM Portable Startscript for MySQL Workbench
SET USERPROFILE=%CD%
IF NOT EXIST "%CD%\AppData\Roaming\MySQL\Workbench" MD "%CD%\AppData\Roaming\MySQL\Workbench"
START MySQLWorkbench.exe
REM This close the DOS Box after starting the Workbench
EXIT

The exit command can be remarked for debuging Smile

Regards Hugo

PatPeter
Offline
Last seen: 1 year 8 months ago
Joined: 2010-09-20 15:32
You have...

You have... no idea what alternative measures I took with this program. I created a batch script to replace the old drive letter in all XML files with the new drive letter from computer to computer, followed by copying the files to the computer and back to the thumb drive. Thank you so much.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 9 months ago
Joined: 2007-04-15 21:08
PortableApps.com Launcher

The PortableApps.com Launcher is designed for taking care of things like that.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Electronjockey
Offline
Last seen: 12 years 9 months ago
Joined: 2010-03-22 15:35
Launcher

I suggested that in my original post. I personally don't use the app that often, and, as I mentioned, it requires the .Net framework, so not really "portable", so didn't feel like taking the time to make a launcher.

Log in or register to post comments