arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Installing MariaDB Connector/J

Complete MariaDB installation guide. Complete setup instructions for Linux, Windows, and macOS with configuration and verification for production use.

circle-info

The most recent (GA) release of MariaDB Connector/J is:

Download MariaDB Connector/Jarrow-up-right

hashtag
Installing MariaDB Connector/J with a Package Manager

The recommended way to install MariaDB Connector/J is to use a package manager like or .

hashtag
Installing MariaDB Connector/J with Maven

To install MariaDB Connector/J with , add the following dependency to your pom.xml configuration file:

Ensure to replace the $VERSION with a valid MariaDB Connector/J version number. See to determine which MariaDB Connector/J release series supports your Java version.

hashtag
Installing MariaDB Connector/J with Gradle

To install MariaDB Connector/J with , add the following dependency to your build.gradle configuration file:

Ensure to replace the $VERSION with a valid MariaDB Connector/J version number. See to determine which MariaDB Connector/J release series supports your Java version.

.

hashtag
Installing MariaDB Connector/J Manually with the JAR File

It is not generally the recommended method, but MariaDB Connector/J can also be installed by manually installing the .jar file to a directory in your . MariaDB Connector/J .jar files can be downloaded from the following URL:

hashtag
Installing MariaDB Connector/J from Source

This section deals with building the connector from the source and testing it. If you have downloaded a ready-built connector in the package as a jar file, then this section may be skipped.

The source code is available at the on GitHub. You can clone it by executing the following:

If you would prefer a packaged source tarball release, then MariaDB Connector/J .jar source code tarballs can be downloaded from the following URL:

MariaDB Connector/J has the following build requirements:

  • Java JDK

If you would like to run the unit tests, then you'll need a MariaDB or MySQL server. It has to meet the following requirements:

  • It must be listening on localhost a TCP port 3306.

  • It must have a database called testj.

  • It must have a root

If you would like to build MariaDB Connector/J and run the unit tests, then execute the following:

If you would like to build MariaDB Connector/J without running the unit tests, then execute the following:

Once the build is complete, you should have a .jar file with a name like the one mariadb-java-client-x.y.z.jar in the target subdirectory.

user account with an empty password.
Mavenarrow-up-right
Gradlearrow-up-right
Mavenarrow-up-right
About MariaDB Connector/J: Java Compatibility
Gradlearrow-up-right
About MariaDB Connector/J: Java Compatibility
Gradle configuration
CLASSPATHarrow-up-right
https://mariadb.com/downloads/connectors/arrow-up-right
mariadb-connector-j repositoryarrow-up-right
https://downloads.mariadb.org/connector-java/arrow-up-right
Mavenarrow-up-right
<dependency> 
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>$VERSION</version>
</dependency>
implementation 'org.mariadb.jdbc:mariadb-java-client:$VERSION'
git clone https://github.com/MariaDB/mariadb-connector-j.git
mvn package
mvn -Dmaven.test.skip=true package
spinner
Stable
MariaDB Connector/J 3.5.3