Setting JDBC to use mySQL

To use mySql in your java projects in eclipse first go to and download the connector, for example:
  • mysql-connector-java-5.1.13-bin.jar
Finally copy it to your lib folder, for example:
  • path-to-your-workspace/your-workspace-name/WebContent/WEB-INF/lib
Go to the eclipse, right button on the project name and select "Refresh".

Pay atention, to use the new imported jar you have to add one of the following imports to your classes:
  • import com.mysql.jdbc.Driver;
  • import com.mysql.jdbc.*;


Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction