Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing an application using Java and MySQL. I've installed libmysql-java package as a database connector, but the installed connector implements version 3.0 of the JDBC specification.

Does anybody know which packages or connectors are needed to install for using JDBC 4.0 in Ubuntu 12.04 using MySQL.

I'm using

  • Java (java version "1.7.0_04")
  • MySQL (mysql Ver 14.14 Distrib 5.5.22)
share|improve this question
up vote 3 down vote accepted

According to this page 5.1.x versions of Connector/J supports JDBC 4.0 and the version of Connector/J available in latest Ubuntu repository is libmysql-java 5.1.16-2. So the driver you are using probably supports JDBC 4.0.

share|improve this answer
Thanks, I was confused because package description which does not suggest anything about jdbc 4.0 – bitsbuffer Jun 1 '12 at 12:42
@Sky don't immediately go by package description. – Thomas Ward Jun 1 '12 at 13:18
Glad if it has helped, please accept it as the correct answer unless you need other information. – Samik Jun 1 '12 at 19:39

One can download the latest connector from the MySQL website

Extract the tar and use mysql-connector-java-5.1.20-bin.jar as mysql-connector

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.