Here is a quick reference to connect mysql database with java in linux environment. INSTALLATION: Hope jdk, mysql server and client are already installed on your box. then install the libmysql-java sudo apt-get install libmysql-java it will install the connector in your box or download the jar file manually from http://dev.mysql.com/downloads/connector/j/ if mysql-connector-java.jar is located in the /usr/share/java