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)
According to this page
5.1.x
versions ofConnector/J
supportsJDBC 4.0
and the version of Connector/J available in latest Ubuntu repository islibmysql-java 5.1.16-2
. So the driver you are using probably supportsJDBC 4.0
.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