If you have problems with CLASSPATH java.lang.ClassNotFoundException: com.mysql.jdbc.Driver, this might work:
1.-
install the java - mysql connector:
sudo apt-get install libmysql-java
2.-
gedit ~/.bashrc
3.-
add this 2 lines at the end:
CLASSPATH=$CLASSPATH:/usr/share/java/mysql-connector-java.jar
export CLASSPATH
thats it!