August 28, 2013

Getting MysQL utilities to work in MySQL Workbench 6.0 on Ubuntu 12.04 LTS


I installed MySQl Workbench 6.0 (downloaded from thier website) on my Ubuntu 12.04 LTS.
Installation ran smoothly.

However when I tried to start the shell for MySQL Utilities, I had an error saying that MySQL utilities weren't installed, and that I had to download and install them.

So I did. But when trying to install the .deb package for my arch, boom :

The MySQL Connector/Python module was not found

I found this module that looked like the right one (disclaimer : I'm a total noob regarding linux)

sudo apt-get install python-mysql.connector

Installation OK, but still MySQL can't find the connector.

What worked in the end : download and compile sources :

cd /usr/share

sudo wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.12.zip

sudo unzip mysql-connector-python-1.0.12.zip

cd mysql-connector-python-1.0.12/

sudo python setup.py install


Then I was able to launch the shell utilities.

Hope this help.

August 14, 2013

Eclipse shortcuts

There's already tons of posts dealing with this, but I don't care and I'll share my favourite eclipse shortcuts anyway :

Ctrls ^^
Ctrl + Space => completion
Ctrl + T => show implementations for an interface method
Ctrl + Shift + O (the letter)=>organise imports
Ctrl + Alt + H => lookup call hierarchy for this method or attribute
Alt + Shift + X, then J => Run a java class containing a main method
Alt + Shift + X, then T => Run junit tests in current class
Alt + up or down arrow => move a line up or down
Alt + left or right arrow => go to last edited location
Ctrl + Alt + up or down arrow => duplicate current line and copy it above or below
Ctrl + page up or page down => move from one tab to another. Really useful, except when you hit the bloody xml editor in your tabs...
Ctrl + L => goto line number ....
Ctrl + Shift + L => pops up the shortcut list
Alt + Enter => Access file properties. Useful to check file encoding, or check version control file URL
Ctrl + Shift + R => Open File
Ctrl + Shift + T => Open Type. Useful to find a class in a jar for example
Ctrl + W => Close file
F12 => Go to editor view
Ctrl + M => maximize/minimize current editor
Ctrl + 1 => show quickfix. has the same effect as hovering over an error with the mouse
Ctrl + E => display list of opened editors
Ctrl + Shift + F => Format code
Ctrl + I => Indent code
F3 => open déclaration
F4 => open hierarchy
Alt + Shift + R => rename field
Alt + Shift + T => show refactor menu

I usually also create a binding for the "generate getters and setters" action.

Please feel free to propose new ones if you feel like I've forgotten important ones.