MySQL Workbench 5.1.x Linux Alpha – Testing on 32 bit and 64 bit Ubuntu

Posted by on Oct 15, 2008 in Technology3 comments

mysql workbenchUpdated 30/11/08 for 5.1.4

A while ago, MySQL announced the long awaited Alpha release of MySQL Workbench 5.1 for Linux. I’ve been waiting to try the Workbench out for a while, and I’ve finally had a chance to download, install and quickly test the latest Alpha release. Since it’s an Alpha release, there are many things that don’t yet work – bugs, crashes and so on – and while the developers are not currently asking the public to report bugs, they are aware of the issues, and the status of the Linux release can be viewed online.

First impressions? Looks great! Also, since it’s being developed on Ubuntu, it’s easy as easy can be to install and test – well, for 32 bit users. For 64 bit users, there’s a little more work involved, but it’s all pretty painless. The only current prerequisite that needs installing is libctemplate0, which can be downloaded from google’s cTemplate page. All other dependencies are taken care of by apt. The download page contains a precompiled deb file, as well as rpm, and source tarball.

32 Bit users

wget http://google-ctemplate.googlecode.com/files/libctemplate0_0.91-1_i386.deb
sudo dpkg -i libctemplate0_0.91-1_i386.deb

MySQL Workbench now has its own Ubuntu repositories, making it easy to download and install via apt. The following lines need adding to /etc/apt/sources.list:

deb ftp://ftp.mysql.com/pub/mysql/download/gui-tools/ubuntu/ binary/
deb-src ftp://ftp.mysql.com/pub/mysql/download/gui-tools/ubuntu/ source/

which can be done via the command line by running:

sudo pico /etc/apt/sources.list

or, if you prefer a graphical text editor:

gksu gedit /etc/apt/sources.list

and appending the two lines to the end of the fil. Once the new repositores are added and saved, run:

sudo apt-get update

to renew the packages.

Once the repositories had been updated, MySQL Workbench can be installed using apt (this can also be done via the Synaptic Package Manager by searching for “mysql-workbench”)

sudo apt-get install mysql-workbench

Told you it was easy.

64 Bit users

Unfortunately, there are as yet no binary debs for 64 bit users, so we have to compile from source. No worries – it’s pretty straightforward. First, I installed the prerequisites (all one line):

sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libglu1-mesa-dev libmysqlclient15-dev uuid-dev liblua5.1-dev libpixman-1-dev libpcre3-dev libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev

I then grabbed the ctemplate-0.91.tar.gz file from the ctemplate download page, downloaded to my desktop, then compiled and installed:

cd ~/Desktop
sudo cp ctemplate-0.90.tar.gz /usr/local/src
cd /usr/local/src
sudo tar -zxvf ctemplate-0.91.tar.gz
cd ctemplate-0.91
./configure
make
sudo make install

Also, include the lib directory in the library search path by running:

export LD_LIBRARY_PATH=/usr/local/lib

Next I downloaded the MySQL Workbench Alpha source code to my desktop, and compiled it:

cd ~/Desktop
mkdir ~/mysqlwb-src
mkdir ~/mysql-workbench
mv mysql-workbench-5.1.4-alpha.tar.gz ~/mysqlwb-src
cd ~/mysqlwb-src
tar -zxvf mysql-workbench-5.1.4-alpha.tar.gz
cd mysql-workbench-5.1.4-alpha
./autogen.sh
make install DESTDIR=/home/<USERNAME>/mysql-workbench

Note: Build speed can be increased by running multiple parallel build threads, by adding the -jX parameter to the make command, where X is the number of parallel threads to run.

Compiling may take a looooong time, so do what I did, and grab a brew (or a coffee). Once it was compiled, I could cd into the directory, and run mysql-workbench:

cd ~/mysql-workbench/usr/local/bin
./mysql-workbench

That’s it.

References

  1. Linux Build Instructions: http://dev.mysql.com/workbench/?page_id=152
  2. 32 bit install instructions: http://dev.mysql.com/workbench/?p=158
  3. MySQL Workbench Linux Development status: http://dev.mysql.com/workbench/?page_id=155
Tags: ,