Connect to MySQL DB
# ubuntu package
sudo apt-get install -y libmysql-java
path: /usr/share/java/mysql-connector-java.jar
# download
wget http://ftp.gwdg.de/pub/misc/mysql/Downloads/Connector-J/mysql-connector-java-5.1.12.tar.gz -P /tmp
# extract
tar xzf /tmp/mysql-connector-java-5.1.12.tar.gz -C /tmp/
# copy to your classpath
cp /tmp/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar ~/NetBeansProjects/classpath/
# Netbeans
add Library / Jar File
select
~/NetBeansProjects/classpath/mysql-connector-java-5.1.12-bin.jar
# create tatabase
create database java;