Nov 30
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Ok, so this is a few weeks after it’s been released, but I’ve not had much of a chance to catch up on these things! Anyway, following my post on MySQL Workbench 5.1.3 Alpha, here’s an update on installing the latest version - 5.1.4 Alpha. 32 Bit users can install from the repositories, by first adding the following to /etc/apt/sources.list so, open up a Terminal, and run the following:

gksu gedit /etc/apt/sources.list

Once the Text editor is open, add the following lines to the end of the file:

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/

Save the file, and close the Editor. From the terminal, run:

sudo apt-get update
sudo apt-get install mysql-workbench

That’s it. 64 Bit users still have to compile and install from the source tarball - the latest version of which can be downloaded from ftp://ftp.mysql.com/pub/mysql/download/gui-tools/mysql-workbench-5.1.4alpha.tar.gz, but the instructions are the same as in my previous post “MySQL Workbench 5.1.3 Linux Alpha - Testing on 32 bit and 64 bit Ubuntu“.

This version has loads of bug fixes and some new features implemented, but it’s still not recommended to use on a Production DB!

written by Hodge \\ tags: , ,

Oct 15
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

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

written by Hodge \\ tags: ,

Apr 12
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Eclipse SDKNOTE, 04/08/08: This tutorial covers Eclipse Europa. If you would like to install the latest version of Eclipse 3.4 Ganymede, with PDT and SQL Explorer, take a look at my latest Tutorial: “64 Bit Eclipse 3.4 (Ganymede) IDE with PDT and SQL Explorer - Full PHP/MySQL Web Application IDE“.

I had tried once before to install the x64 (64 Bit) version of Eclipse IDE, about 8 months ago, but found it to be somewhat buggy and unstable. In the interim, I’ve been using the 32 Bit version of Eclipse PDT for my development stuff. Earlier this year (21/02/08) a new version of Eclipse 64 Bit was released, so I gave it a go today. So far, so good!

Unfortunately, there’s no 64 Bit PDT all-in-one, but I managed to install a 64 Bit equivalent by cobbling together the relevant packages available by using the Eclipse Update Manager system, after initially installing the latest version of Eclipse Classic 3.3.2 64 Bit.

I wanted to keep everything (or as much as possible) 64 Bit, so I also download and installed the 64 Bit JRE, which can be downloaded here (or use the direct link to the bin file). The method for installing the 64 Bit JRE is the same as the 32 Bit version - after the file downloaded to my desktop, I opened up a new Terminal Window (Applications -> Accessories -> Terminal), traversed to the directory I wanted to install it into, moved the file, made it executable, and ran it to install:

cd /usr/java
sudo mkdir 64
cd 64
sudo mv ~/Desktop/jdk-6u5-linux-x64.bin /usr/java/64/
sudo chmod a+x jdk-6u5-linux-x64.bin
sudo ./jdk-6u5-linux-x64.bin

If the “java” directory doesn’t exist, it needs to be created first:

sudo mkdir /usr/java

listing the directory

ls

should return

jre1.6.0_05

which is the directory containing the necessary Java binaries.

As with my previous 32 Bit installation, I wanted Eclipse to be installed in the /opt directory:

cd /opt
sudo mv ~/Desktop/eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz /opt
sudo tar -zxvf eclipse-SDK-3.3.2-linux-gtk-x86_64.tar.gz

then rename the eclipse directory:

sudo mv eclipse eclipse64

I also needed to get the newly installed Eclipse to run with the newly installed JRE - by default, the eclipse executable in the directory will try and detect Java and use whatever it finds, so I created a shell script:

cd eclipse64
sudo gksu gedit eclipse.sh

containing the following:

#!/bin/bash
PATH=/usr/java/64/jre1.6.0_05/bin:$PATH
/opt/eclipse64/eclipse

Now instead of running the eclipse executable, I run eclipse.sh (make sure it’s executable)

sudo chmod 755 eclipse.sh

before running

/opt/eclipse64/eclipse.sh

PDT and WTP Plugins

The first time I ran the new 64 Bit version, everything went well - it was fast, and seemed stable, so I went ahead and started installing all the additional plugins I needed (and still need…). Goto Help -> Software Updates -> Find and Install, and select “Search for new features to install”.Click on “New Remote Site” for each of the following:

  • Name: PDT, URL: http://download.eclipse.org/tools/pdt/updates/
  • Name: WTP, URL: http://download.eclipse.org/webtools/updates/
  • Name: GEF, URL: http://www.eclipse.org/gef/updates/
  • Name: EMF, IRL: http://www.eclipse.org/modeling/emf/updates/

Eclipse Update Manager Add Remote Site

Actually, there are only a couple of components required from the GEF (Graphical Editing Framework) and EMF (Eclipse Modeling Framework) packages to satisfy dependencies - WTP (Web Tools Platform) requires a package from GEF, and GEF from EMF…

After adding these, click on Finish - the Update Manager will then query any mirrors for the latest versions of the plugins. Once it has finished, a dialog appears, where it is possible to select the plugins to download and install. First, I selected PDT - the Update Manager then informed me that PDT requires files from WTP, so I tried clicking the “Select Requires” button, hoping that it would sort out the dependencies on my behalf. Unfortunately, nothing happened… So, I selected WTP manually, then expanded GEF -> Eclipse SDK R3.3.1 and Selected Graphical Editing Framework 3.3.1v20070814, then expanded EMF -> EMF SDK 2.3.2 and selected Eclipse Modeling Framework (EMF) - org.eclipse.emf.ecore 2.3.2v200802051830… I could then click “Select Required” to get the last few residual required dependencies… Phew…

Eclipse Update Manager Select Updates

Actualy, it still bugged me for dependencies for Java Persistence API contained in WTP, but by that stage I really couldn’t be arsed going through the process of adding more stuff to the Update Manager and potentially having to search for further dependencies, so I just deselected the three Java Persistence API files contained in WTP.

OK, with the dependencies sorted, I clicked Next, accepted the agreements, finished, and went to make, and drink a brew (that’s Tea) while the Update Manager downloaded and installed the requested stuff.

MySQL: SQL Explorer Plugin

Eclipse SQL Explorer LogoOnce everything had downloaded and installed, I restarted Eclipse. Everything looked good! Great, in fact. But I also wanted to install a few more plugins, including the MySQL SQL Explorer Plugin - which additionally requires, and depends on Eclipse DTP (Data Tools Project). Eclipse DTP has to be downloaded and installed manually, since there is no automated Update Site. So, I downloaded dtp_1.5.2_022008.zip to my Desktop, and set about extracting and installing the files:

cd ~/Desktop
mkdir DTP
mv dtp_1.5.2_022008.zip DTP
cd DTP
unzip dtp_1.5.2_022008.zip
cd eclipse
sudo cp -R features plugins /opt/eclipse64

If Eclipse is open, restart it. With the DTP installed, I could set about installing the SQL Explorer Plugin. The instructions for installing and configuring the SQL Explorer Plugin can be found in my previous article - Eclipse PDT and MySQL - SQL Explorer Plugin, since I don’t want to regurgitate information, just follow the link if you need to install it, and come back when it’s done.

Note: Actually, now I had the DTP installed, I could download and install the additional Java Persistence API in WTP! Same method: Update Manager, select WTP etcetera, etcetera…

ATF: AJAX Framework Toolkit

Script.aculo.usOnce the SQL Explorer Plugin was installed, I had one final plugin - ATF (the AJAX Toolkit Framework). This can be downloaded as a Site Archive, and the zip file added to Eclipse’s Update Manager. Once downloaded, I opened the Update Manager in Eclipse (Help -> Software Updates -> Find and Install), and clicked on “New Archived Site”, to add a new locally archived site, calling it ATF, and pointing it to the freshly downloaded atf-incubation-SiteArchive-0.2.3M4-v200709141050.zip file. I discovered, however, that the site.xml file contained within the zipped site archive is somewhat out of date and the pointers within are directed to the wrong download locations, so I had to manually locate the additional dependent plugins - Mozilla XULRunner, and Mozilla JS. They can both be added as New Remote Sites to the Update Manager, by clicking on the “New Remote Site” button, and adding the following information:

  • Name: Mozilla JS, URL: http://ftp.mozilla.org/pub/mozilla.org/js/eclipse/
  • Name: XULRunner, URL: http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/1.8.1.3/contrib/eclipse/

The previously used EMF plugin is also required to satisfy a couple of dependencies, so I selected the ATF, Mozilla JS, XULRunner, and EMF plugins from the list, and clicked Finish. Once the “updates” were found, I selected XULRunner, Mozilla JS, ATF (I deselected the ATF -> Mozilla JS component though, since an updated version was to be downloaded and installed from the Mozilla Server), and also selected the required EMF components. Click through Next etc. to download and install. Once completed, I restarted Eclipse.

In the Window -> Preferences menu by the way, AJAX toolkits such as Script.aculo.us can be added to the ATF module.

Et Voila! I now have a working Eclipse 64 Bit version up and running! Finally!

Oh, if you want a desktop icon, just create a file on your Desktop called Eclipse.desktop,

cd ~/Desktop
gedit Eclipse.desktop

and add the following:

[Desktop Entry]
Categories=;
Encoding=UTF-8
Exec=/opt/eclipse32/eclipse.sh
Hidden=false
Icon=/opt/eclipse64/icon.xpm
Icon[en_US]=/opt/eclipse64/icon.xpm
Name=Eclipse
Name[en_US]=Eclipse
Terminal=false
Type=Application
Version=1.0

written by Hodge \\ tags: , , , , , , ,

Mar 27
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Eclipse SQL Explorer LogoI’ve been using Eclipse PDT for some time now, and since PHP programming invariably involves connecting to a database at some point or another, I wanted to be able to access my MySQL databases from within the Eclipse IDE - even if only to quickly debug SQL statements. I generally use a combination of a locally installed phpMyAdmin, MySQL Administrator, MySQL Query Browser, and now the Eclipse SQL Explorer Plugin, which give me all the functionality I need for Web Application development.

phpMyAdmin, MySQL Administrator and MySQL Query Browser can be installed as follows, by the way:

sudo apt-get install phpmyadmin mysql-admin mysql-query-browser

Installing Eclipse SQL Explorer was pretty straight forward - I simply downloaded the archive package from Sourceforge, saved it to a directory in on my desktop (there is also a standalone client available, so be sure to download “Eclipse SQL Explorer [RCP/Plugin]” if you’re setting it up as an Eclipse plugin - here’s a direct link to the latest plugin file), and extracted the files:

cd ~/Desktop/sqlexplorer
unzip sqlexplorer_plugin-3.5.0.RC5.zip

This created two directories (features and plugins) along with two text files. To install the plugin, I just copied the two directories to my Eclipse root installation directory (see my previous post “Eclipse PDT IDE for PHP MySQL 32 Bit install on 64 Bit Ubuntu“), which is /opt/eclipse32

cp -R features plugins /opt/eclipse32/

Notice there was no need to use the sudo command before copying, since my user owns the eclipse32 folder.

Configuring SQL Explorer

Once installed, I also had to do some additional setup before I could configure SQL Explorer to connect to my local MySQL databases via Eclipse - namely, download and install the Java Connector for MySQL (MySQL JDBC Driver), to enable JDBC connections. The latest driver (5.1 at the time of writing) tar.gz file can be downloaded from the MySQL site here.

Once downloaded, I just extracted the files, and entered the new directory:

cd ~/Desktop/mysqljdbc
tar -zxvf mysql-connector-java-5.1.6.tar.gz
cd mysql-connector-java-5.1.6

The important file here (along with the documentation, of course) is the mysql-connector-java-5.1.6-bin.jar file, which is the driver itself. I guess this could be placed anywhere, since we just need to point the SQL Explorer plugin to it when setting it up in Eclipse, but for convenience and tidiness, I moved it to the /usr/share/mysql directory:

sudo cp mysql-connector-java-5.1.6-bin.jar /usr/share/mysql

With the JDBC driver installed, I could set up the Eclipse SQL Explorer plugin. In Eclipse, I went to Window->Preferences and expanded the new SQL Explorer section, highlighting “JDBC Drivers”, then double clicking on “MySQL Driver” to open the MySQL setup dialog:

Eclipse SQL Explorer Setup

In the MySQL Driver setup, I had to point the plugin to the MySQL JDBC Driver, by clicking on the “Extra Class Path” tab, and then clicking “Add” to point it to /usr/share/mysql/mysql-connector-java-5.1.6-bin.jar. Once added, clicking on “List Drivers” will bring up the list of available drivers in the “Driver Class Name” pull down menu. Only one is listed, and it just so happens to be the one we need - com.mysql.jdbc.Driver:

Eclipse SQL Explorer Setup

Click OK, and the driver is set up! I also clicked the “Set Default” button, since MySQL is currently the only database I connect to. With the Driver set up, I could then set up a connection to my database system. If the “Connections” view is not already available, it has to be selected via the Window->Show View->Other menu, and clicking on the “Connections” view within the “SQL Explorer” folder in this dialog.

With the Connections View available, I could set up the new connection profile, by right clicking in the view and selecting “New Connection Profile”, which opens up a new dialog, in which the new connection data is input:

Eclipse SQL Explorer Setup

It was a pretty simple process to create the connection - I just needed to replace the relevant parameters in the JDBC connections string with my connection details, so

jdbc:mysql://<hostname>[<:3306:>]/<dbname>

became

jdbc:mysql://localhost:3306/mydatabase

Entered the DB username and password, gave the connection a name, selected the newly created MySQL Driver, and clicked OK to save the connection. Double clicking the connection name in the Connections View connects to the DB and brings up an SQL window form which Queries may be run. By default, the results are displayed in a small view at the bottom of the main Eclipse IDE window - although, this can be dragged and placed anywhere. There are also several other views available via the Window->Show View->Other menu within the SQL Explorer section to peruse.

The Eclipse SQL Explorer homepage has extensive documentation available, including a cool section on extending the plugin. Maybe I should learn Java too?

That’s all Folks.

written by Hodge \\ tags: , , , ,

Feb 29
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Eclipse SDKUpdate 12/04/08: I have now successfully installed the x64 version of Eclipse - see 64 Bit Eclipse: Linux Installation, including PDT, WTP (WST), ATF, and MySQL (SQL Explorer Plugin) for a step by step guide, or continue reading this article if you want to install the 32 bit version.

32 Bit installation

I went through several different methods of installing the Eclipse IDE on my Ubuntu system. I tried the obvious first - installing via the Synaptic Package Manager, but found it a bit of a pain to install any plugin packages I downloaded (I also use WST and SqlExplorer in addition to PDT). So, I uninstalled, then tried the 64 Bit version of the SDK (which at the time was pretty buggy, and unstable), in the hope that I’d be able to plug in a 64 Bit version of the PDT, which I soon found doesn’t exist yet! So, I finally settled for installing the 32 Bit version of Eclipse PDT, which enabled me to install the plugins too.

In order to install and run this successfully, I first downloaded the 32 Bit Java Runtime Environment installer “Linux (self-extracting file)” from http://www.java.com/en/download/linux_manual.jsp (or direct link to the file), and saved the jre-6u3-linux-i586.bin to my desktop.

Once the file downloaded, I opened up a Terminal (Applications -> Accessories -> Terminal), and typed

cd /usr/java

(if the java directory doesn’t exist, it need to be created:

sudo mkdir /usr/java
cd /usr/java

I also wanted a 64 bit version of the JRE installing, so within the /usr/java directory, created two more sub directories:

sudo mkdir 32
sudo mkdir 64

then copied the newly downloaded JRE installation file from the desktop to the /usr/java/32 directory, and made the file executable:

cd 32
sudo mv ~/Desktop/jre-6u3-linux-i586.bin /usr/java/32/jre-6u3-linux-i586.bin
sudo chmod a+x jre-6u3-linux-i586.bin

then execute the binary:

sudo ./jre-6u3-linux-i586.bin

Accept the terms, and so on and so forth… When it says “Done”, it’s, well, done!

ls

should return:

jre1.6.0_03

Note: If you download a newer version of JRE, then you’ll need to change the above commands containing “jre-6u3-linux-i586.bin” to “jre-6u<version>-linux-i586.bin” where <version> is 3, 4, 5 etc.!

Now for Eclipse. I downloaded the latest version from http://download.eclipse.org/tools/pdt/downloads/ (the current stable version is R20080103) - I click on the link for the latest release, and downloaded the pdt-all-in-one-R20080103-linux-gtk.tar.gz file to the desktop. Once it finished, I went back to the terminal, and entered the /opt directory, moved the Eclipse package to the /opt directory, and extracted the new files:

cd /opt
sudo mv ~/Desktop/pdt-all-in-one-R20080103-linux-gtk.tar.gz /opt
sudo tar -zxvf pdt-all-in-one-R20080103-linux-gtk.tar.gz

This extracts the Eclipse IDE into a directory called, oddly enough, “eclipse”. However, I’m experimenting with the 64 bit version too, so I changed the directory name to eclipse32:

sudo mv eclipse eclipse32

As it was, Eclipse wouldn’t run, since it doesn’t know where to find the JRE I’d just installed, so, I had to create a small shell script in order for it to run correctly:

cd eclipse32
gksu gedit eclipse.sh

This opened up a text editor, with a blank file called “eclipse.sh”. The shell script is:

#!/bin/bash
PATH=/usr/java/32/jre1.6.0_03/bin:$PATH
/opt/eclipse32/eclipse

PATH=/usr/java/32/jre1.6.0_03/bin:$PATH should point to the bin directory of the previously installed.

The script also needed to be executable:

sudo chmod 755 eclipse.sh

and I also changed the ownership of all the files and directories to my username:

sudo chown -R username:group *

That was pretty much it - I could run Eclipse by opening a Terminal window and running

cd /opt/eclipse32
./eclipse.sh

which got a little tiresome after the first time, so I created a menu item (System -> Preferences -> Main Menu) which pointed to /opt/eclipse32/eclipse.sh, and even included the png Eclipse logo for the icon :)

Any plugins can be downloaded, and extracted into the relevant directories - or, installed by the Eclipse Update Manager.

I’ve recently written a post on “Eclipse PDT and MySQL - SQL Explorer Plugin“, for anyone who needs to set up MySQL connections in Eclipse.

written by Hodge \\ tags: , , , , , , ,

Webloogle Blog Directory