Update 2012-04-25: mysql has appeared in the universe package archive. You should be able to install it with a simple:
sudo apt-get install mysql-workbench |
Read on if you still want to compile from source.
Right now (2012-04-04), Ubuntu 12.04 hasn’t been released yet, and so there is no binary package from Oracle of MySQL Workbench for Precise. I managed to get the MySQL Workbench binaries for Oneiric to run, by manually installing libzip1_0.9.3-1_amd64.deb from Oneiric, but this wasn’t stable (crashed as soon as I tried to run a SQL Query).
So I decided to build from source. Here’s how I did it:
wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQLGUITools/mysql-workbench-gpl-5.2.38-src.tar.gz md5sum mysql-workbench-gpl-5.2.38-src.tar.gz # should be cd2a0cec9dffd5465b6999f5d9c8de78 (from http://dev.mysql.com/downloads/workbench/#downloads). tar xvzf mysql-workbench-gpl-5.2.38-src.tar.gz cd mysql-workbench-gpl-5.2.38-src # from http://bugs.mysql.com/bug.php?id=63898 fgrep -rlZ pkglib_DATA --include Makefile.am . | xargs -0 sed -i 's/pkglib_DATA/pkgdata_DATA/g' # from https://bugzilla.redhat.com/show_bug.cgi?id=750023 vim ./modules/db.mysql.sqlparser/src/mysql_sql_parser_fe.cpp |
change line 23 from:
#include <glib/gunicode.h>
to
#include <glib.h>
apt-get update # from http://ubuntuforums.org/showthread.php?t=1792874 plus updates from comments below. sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libgl1-mesa-dev libmysqlclient-dev uuid-dev liblua5.1-dev libpcre3-dev g++ libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev libsqlite3-dev python-dev libboost-dev libctemplate-dev ./autogen.sh # I use -j4 below to use all four of my CPUs, set this appropriately for your setup. make -j 4 install DESTDIR=/home/`echo $USER`/mysql-workbench ~/mysql-workbench/usr/local/bin/mysql-workbench |
Thank you for posting this. Exactly what I was looking for!
Additionally, I had to install this Python module for it to work for me:
sudo aptitude install python2.7-paramiko
Ah ok. I already had the python-paramiko package (version 1.7.7.1-2) installed (rather than python2.7-paramiko), so that appears to work too.
its not working for me….
sudo apt-get install build-essential autoconf automake libtool libzip-dev libxml2-dev libsigc++-2.0-dev libglade2-dev libgtkmm-2.4-dev libgl1-mesa-dev libmysqlclient16-dev uuid-dev liblua5.1-dev libpcre3-dev g++ libgnome2-dev libgtk2.0-dev libpango1.0-dev libcairo2-dev sqlite3-dev python-dev libboost-dev libctemplate-dev
abouve statements says something error on package…
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘liblua5.1-0-dev’ instead of ‘liblua5.1-dev’
E: Unable to locate package sqlite3-dev
Err http://in.archive.ubuntu.com/ubuntu/ precise/main libpng12-dev i386 1.2.46-3ubuntu3
404 Not Found [IP: 91.189.92.182 80]
Err http://in.archive.ubuntu.com/ubuntu/ precise/main libcanberra-dev i386 0.28-3ubuntu2
404 Not Found [IP: 91.189.92.182 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-dev_1.2.46-3ubuntu3_i386.deb 404 Not Found [IP: 91.189.92.182 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/libc/libcanberra/libcanberra-dev_0.28-3ubuntu2_i386.deb 404 Not Found [IP: 91.189.92.182 80]
E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?
almost done now this error shows
libtool: link: `binary_data_editor.lo’ is not a valid libtool object
make[2]: *** [libwbpublic.la] Error 1
make[2]: Leaving directory `/home/rijn/Downloads/mysql-workbench-gpl-5.2.38-src/backend/wbpublic’
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/rijn/Downloads/mysql-workbench-gpl-5.2.38-src/backend’
make: *** [install-recursive] Error 1
The 404s suggest that you didn’t do an apt-get update before installing the packages.
Your latest error might be fixable with a “make clean” to start over.
can u steps once again….if below error occure
ibtool: link: `binary_data_editor.lo’ is not a valid libtool object
make[2]: *** [libwbpublic.la] Error 1
make[2]: Leaving directory `/home/rijn/Downloads/mysql-workbench-gpl-5.2.38-src/backend/wbpublic’
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/rijn/Downloads/mysql-workbench-gpl-5.2.38-src/backend’
make: *** [install-recursive] Error 1
thank you….its woking for me……anyway nice work adim….
thanks again
Great work! now I don’t have to switch between virtual machines to use workbench.
install libsqlite3-dev rather than sqlite3-dev
..and thank you for this post. It worked for me after I installed libsqlite3-dev rather than sqlite3-dev.
Thanks guys. I’ve updated the list of packages in the post now to reflect this. I changed sqlite3-dev to libsqlite3-dev and libmysqlclient16-dev to libmysqlclient-dev. Hopefully this works better for people.
-Rob
Today I looked again and found mysql-workbench in universe/database on 12.04
aptitude show mysql-workbench
Great, thanks. I’ve put a note at the top of the post.
I tried the 5.2.40 version with no success…. The compilation process froze my computer each time and I need to reboot… on ubuntu 12.04…
I get error:
thedam@thedamPC:~$ mysql-workbench
ERROR: ld.so: object ‘/lib/x86_64-linux-gnu/libSegFault.so’ from LD_PRELOAD cannot be preloaded: ignored.
/usr/local/bin/mysql-workbench-bin: error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory
Looks like you need to install the package that contains libgtkmm-2.4.so.1. You can find out the package name using apt-file:
$ apt-file search libgtkmm-2.4.so.1
libgtkmm-2.4-1c2a: /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1
libgtkmm-2.4-1c2a: /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1.1.0
libgtkmm-2.4-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1.1.0
Cheers,
Rob
For those who has the following problem with libgtkmm-2.4.so.1
$ mysql-workbench
/usr/lib/mysql-workbench/bin/mysql-workbench-bin: error while loading shared libraries: libgtkmm-2.4.so.1: cannot open shared object file: No such file or directory
I solved it by reinstalling it:
$ sudo aptitude reinstall libgtkmm-2.4-1c2a
cheers
I had a similar problem with mysql workbench, and then came across Valentina Studio. Now i use only this tool, which does everything you need, and does it very well http://www.valentina-db.com/en/valentina-studio-overview