MySQL Connector Java Maven Dependency

This page gives you a quick reference to get MySQL JDBC driver for Maven or Gradle projects. You can also download the MySQL JDBC driver, the link given at the "Download JAR File" section.

What is JDBC Driver?

A JDBC driver is a set of Java classes that implement the JDBC interfaces, targeting a specific database. The JDBC interfaces come with standard Java, but the implementation of these interfaces is specific to the database you need to connect to. Such an implementation is called a JDBC driver.
The MySQL driver is used in Java application to MySQL database using JDBC API. MySQL JDBC driver is a JDBC Type 4 driver.
Learn complete JDBC at https://www.javaguides.net/p/jdbc-tutorial.html

MySQL Connector/J » 8.0.18

This JDBC Type 4 driver for MySQL database. You can check for other releases at https://mvnrepository.com/artifact/mysql/mysql-connector-java.

MySQL JDBC Driver Maven Dependency

The MySQL Driver is available on Maven Central. Copy below MySQL JDBC driver maven dependency and paste in your project pom.xml file:
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.18</version>
</dependency>

MySQL JDBC Driver Gradle Dependency

Copy below MySQL JDBC driver Gradle dependency and paste in your project build.gradle file:
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.18'

Download JAR File

Check for Latest Release

Reference

Free Spring Boot Tutorial | Full In-depth Course | Learn Spring Boot in 10 Hours


Watch this course on YouTube at Spring Boot Tutorial | Fee 10 Hours Full Course

Comments