File: about-mariadb-connector-j.creole

package info (click to toggle)
mariadb-connector-java 2.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,564 kB
  • sloc: java: 64,842; xml: 646; sql: 445; makefile: 2
file content (96 lines) | stat: -rw-r--r-- 3,519 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
= About MariaDB java connector

MariaDB Connector/J is used to connect applications developed in Java to
MariaDB and MySQL databases using the standard JDBC API. The library is LGPL
licensed.


== Introduction
MariaDB Connector/J is a Type 4 JDBC driver.  It was developed specifically as
a lightweight JDBC connector for use with MySQL and MariaDB database servers.
It's originally based on the Drizzle JDBC code, and with a lot of additions and
bug fixes.

== Obtaining the driver
The driver source code can be downloaded from:
https://downloads.mariadb.org/connector-java/

Pre-built .jar files can be downloaded from:
https://code.mariadb.com/connectors/java/


== Installing the driver
Installation of the client library is very simple, the jar file should be saved
in an appropriate place for your application and the classpath of your
application altered to include MariaDB Connector/J rather than your current
connector.

Using maven : 
{{{
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>xxx</version>
</dependency>
}}}

== Requirements

* Java 7 or 8 (Last compatible version with java 6 is [[https://downloads.mariadb.org/connector-java/1.1.9/|1.1.9]])

Dependencies (not mandatory):
* [[https://maven-badges.herokuapp.com/maven-central/com.github.dblock.waffle/waffle-jna|waffle-jna 1.8.1]]
* [[https://maven-badges.herokuapp.com/maven-central/net.java.dev.jna/jna|jna 4.2.1]]
* [[https://maven-badges.herokuapp.com/maven-central/net.java.dev.jna/jna-platform|jna-platform 4.2.1]]
* [[https://maven-badges.herokuapp.com/maven-central/org.slf4j/jcl-over-slf4j|jcl-over-slf4j 1.7.14]]
* [[https://maven-badges.herokuapp.com/maven-central/org.slf4j/slf4j-api|slf4j-api 1.7.14]]
* [[https://maven-badges.herokuapp.com/com.google.guava/guava|guava 19.0]]

jna is needed when when connecting to the server with unix sockets or windows shared memory
All of them are needed for native windows kerberos implementation. (see  [[plugin/GSSAPI.creole|Gssapi documentation]])

== Source code

The source code is available on GitHub:
https://github.com/mariadb-corporation/mariadb-connector-j and the most recent development
version can be obtained using the following command:

{{{
git clone https://github.com/mariadb-corporation/mariadb-connector-j.git
}}}

== License

GNU Lesser General Public License as published by the Free Software Foundation;
either version 2.1 of the License, or (at your option) any later version.


== Building and testing the driver

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

MariaDB Client Library for Java Applications uses maven for build. You first
need to ensure you have both java and maven installed on your server before you
can build the driver.

To run the unit test, you'll need a MariaDB or MySQL server running on
localhost (on default TCP port 3306) and a database called 'testj', and user
'root' with empty password

{{{
git clone https://github.com/mariadb-corporation/mariadb-connector-j.git =  Or, unpack the source distribution tarball
cd mariadb-connector-j

# For the unit test run, start local mysqld mysqld,
# ensure that user root with empty password can login
mvn package

# If you want to build without running unit  tests, use
# mvn -Dmaven.test.skip=true package
}}}

After that, you should have JDBC jar mariadb-java-client-x.y.z.jar in the
'target' subdirectory