Question

I have a Spring/Maven/Hibernate/MySQL application. I am working with the recent release 5.6.17 for MySql. Can someone please point me to mysql 5.6.17 pom file for maven. I cannot find it in the central repo. Thanks. P

Was it helpful?

Solution

I'm assuming you're trying to add the correct version of MySQL's Connector/J library to your project, which would allow you to access your MySQL database from code.

If that's the case, just add this to your project's pom file, under dependencies:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.30</version>
</dependency>

This version (5.1.30) of Connector/J was released March 31, 2014. The similar version numbers might be confusing, but this is most likely the version of the Connector/J library you want.

More information about the Maven dependency here.

EDIT: And because you're using Hibernate, you'll want to set com.mysql.jdbc.Driver as the connection.driver_class in your Hibernate configuration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top