This topic describes how to install or upgrade OceanBase Client. Before the installation or update, make sure that the prerequisites are met.
Prerequisites
Before you install OceanBase JDBC, make sure that you have set up the basic database development environment that meets the following requirements:
You have installed or upgraded to Java JDK 8 on your computer.
You have installed the database management system (DBMS) as required.
Procedure
After you obtain the OceanBase JDBC driver, namely, OceanBase Client, perform the following steps to install or upgrade it:
Install OceanBase Client by using Maven.
Add the following dependencies to the
pom.xmlfile:<dependency> <groupId>com.oceanbase</groupId> <artifactId>oceanbase-client</artifactId> <version>2.2.0</version> </dependency>Note
In earlier versions,
groupIdiscom.alipay.oceanbase.Load the driver.
The class name is
Class.forName("com.oceanbase.jdbc.Driver");orClass.forName("com.oceanbase.obproxy.mysql.jdbc.Driver");Notice
The previous drivers
com.alipay.oceanbase.jdbc.Driverandcom.alipay.oceanbase.obproxy.mysql.jdbc.Drivercompatible.Import internal classes. Change the path from
com.aplipay.oceanbase.jdbctocom.oceanbase.jdbc.Compile the source code.
mvn clean package -DskipTests