2008-12-24

SQLyog on Ubuntu

SQLyog is a popular MySQL GUI client that can be very convenient for certain operations like quickly dumping a database, schema changes. For operations that are awkward via the command line, it is useful.

I've installed SQLyog on my Ubuntu (Hardy Heron) laptop. It was very easy using Wine.

To install SQLyog with Wine

Install Wine on your Ubuntu system using the Synaptic Package Manager. As of this writing, version 1.0.0.1 was current. the exact version of Wine is probably not important.

Download SQLyog from here. I use the community edition. It is not important where you download the installation (Windows EXE) to. Just save the program file someplace convenient that you can easily navigate to via bash in the Terminal.

Open a Terminal window and change to the directory where you stored the EXE installation file. Type:

wine SQLyog714.exe

This is the exact filename that I downloaded. You will probably need to change it to the filename you downloaded.

Follow through the installation process using the standard SQLyog installer. Accept defaults. The program will be installed under a directory in your home directory called .wine.

At the end of the installation, the dialog will allow you to run the program. Go ahead and run it for the thrill of seeing a Windows program run on Linux. Wine is great!

Create a shortcut to run SQLyog in Terminal

I like to run SQLyog from the command line. I could change to the program's directory and start the program with wine SQLyog.exe. Like this:

cd ~/.wine/drive_c/Program\ Files/SQLyog\ Community wine SQLyog.exe

For convenience, I created a script to start SQLyog just by typing sqlyog. I created a text file called sqlyog with the above two lines and made it executable with chmod +x sqlyog. I have a directory in my $PATH for scripts like this, so I can fire SQLyog from anywhere.

Adding SQLyog to the Ubuntu Applications menu

On my installation of SQLyog, an entry was not made in the Applications menu to launch SQLyog. I added it to Applications | Wine by right-clicking on Applications and selecting Edit Menus. I added a new menu item with the New Menu button. The command to run SQLyog is:

env WINEPREFIX="/home/andrew/.wine" wine "C:\Program Files\SQLyog Community\SQLyog.exe"

8 comments:

Anonymous said...

that's crazy! why install teh windows version of a toll which is available for linux too?

Andrew Ault said...

Alright, SQLyog is available for Linux...oh wait, no it is not. :-) Thanks for checking in, Anonymous.

Marc said...

Thanks for the tutorial. I am slowly migrating to Linux and this was helpful.

Andrew Ault said...

Glad to hear it! I use phpMyadmin a lot and MySQL Query analyzer...probably the most. -A

Alber St Clair said...

This was very helpful thanks...

John Ortiz OrdoƱez said...

Hi! Alternative to SQLYog: RazorSQL.

Andrew Ault said...

Thanks Jhon! I'll check it out.

Murali Krishnan said...

Thanks for this info. It very well written.

I used tora for a long time and it works great. Somehow after a recent update of my 9.10 system, tora no longer launches (seg fault).

I can now use SQLyog thanks to your instructions. If you are curious, you could try tora (apt-get install tora) to see if it works for you and if you like it.