diff --git a/docs/en/docs/lakehouse/multi-catalog/jdbc.md b/docs/en/docs/lakehouse/multi-catalog/jdbc.md index 13151bc2f8db5b..06385bf529fa4c 100644 --- a/docs/en/docs/lakehouse/multi-catalog/jdbc.md +++ b/docs/en/docs/lakehouse/multi-catalog/jdbc.md @@ -663,6 +663,23 @@ DROP CATALOG ; SELECT * FROM ; ``` +## JDBC Drivers + +It is recommended to use the following versions of Driver to connect to the corresponding database. Other versions of the Driver have not been tested and may cause unexpected problems. + +| Source | JDBC Driver Version | +|:--------:|:--------:| +| MySQL 5.x | mysql-connector-java-5.1.47.jar | +| MySQL 8.x | mysql-connector-java-8.0.25.jar | +| PostgreSQL | postgresql-42.5.1.jar | +| Oracle | ojdbc8.jar| +| SQLServer | mssql-jdbc-11.2.3.jre8.jar | +| Doris | mysql-connector-java-5.1.47.jar / mysql-connector-java-8.0.25.jar | +| Clickhouse | clickhouse-jdbc-0.4.2-all.jar | +| SAP HAHA | ngdbc.jar | +| Trino/Presto | trino-jdbc-389.jar / presto-jdbc-0.280.jar | +| OceanBase | oceanbase-client-2.4.2.jar | + ## FAQ 1. Are there any other databases supported besides MySQL, Oracle, PostgreSQL, SQLServer, ClickHouse, SAP HANA, Trino and OceanBase? @@ -798,4 +815,4 @@ DROP CATALOG ; You can download the [lz4-1.3.0.jar](https://repo1.maven.org/maven2/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar) package first, and then put it in DorisFE lib directory and BE's `lib/lib/java_extensions` directory (versions before Doris 2.0 need to be placed in BE's lib directory). - Starting from version 2.0.2, this file can be placed in the `custom_lib/` directory of FE and BE (if it does not exist, just create it manually) to prevent the file from being lost due to the replacement of the lib directory when upgrading the cluster. \ No newline at end of file + Starting from version 2.0.2, this file can be placed in the `custom_lib/` directory of FE and BE (if it does not exist, just create it manually) to prevent the file from being lost due to the replacement of the lib directory when upgrading the cluster. diff --git a/docs/zh-CN/docs/lakehouse/multi-catalog/jdbc.md b/docs/zh-CN/docs/lakehouse/multi-catalog/jdbc.md index 545f5ada6e23e6..83fe8194177879 100644 --- a/docs/zh-CN/docs/lakehouse/multi-catalog/jdbc.md +++ b/docs/zh-CN/docs/lakehouse/multi-catalog/jdbc.md @@ -156,29 +156,29 @@ set enable_odbc_transcation = true; * mysql 5.7 -```sql -CREATE CATALOG jdbc_mysql PROPERTIES ( - "type"="jdbc", - "user"="root", - "password"="123456", - "jdbc_url" = "jdbc:mysql://127.0.0.1:3306/demo", - "driver_url" = "mysql-connector-java-5.1.47.jar", - "driver_class" = "com.mysql.jdbc.Driver" -) -``` + ```sql + CREATE CATALOG jdbc_mysql PROPERTIES ( + "type"="jdbc", + "user"="root", + "password"="123456", + "jdbc_url" = "jdbc:mysql://127.0.0.1:3306/demo", + "driver_url" = "mysql-connector-java-5.1.47.jar", + "driver_class" = "com.mysql.jdbc.Driver" + ) + ``` * mysql 8 -```sql -CREATE CATALOG jdbc_mysql PROPERTIES ( - "type"="jdbc", - "user"="root", - "password"="123456", - "jdbc_url" = "jdbc:mysql://127.0.0.1:3306/demo", - "driver_url" = "mysql-connector-java-8.0.25.jar", - "driver_class" = "com.mysql.cj.jdbc.Driver" -) -``` + ```sql + CREATE CATALOG jdbc_mysql PROPERTIES ( + "type"="jdbc", + "user"="root", + "password"="123456", + "jdbc_url" = "jdbc:mysql://127.0.0.1:3306/demo", + "driver_url" = "mysql-connector-java-8.0.25.jar", + "driver_class" = "com.mysql.cj.jdbc.Driver" + ) + ``` #### 层级映射 @@ -371,7 +371,7 @@ CREATE CATALOG jdbc_sqlserve PROPERTIES ( ### Doris -Jdbc Catalog也支持连接另一个Doris数据库: +Jdbc Catalog 也支持连接另一个Doris数据库: * mysql 5.7 Driver @@ -664,6 +664,23 @@ DROP CATALOG ; SELECT * FROM ; ``` +## JDBC Driver 列表 + +推荐使用以下版本的 Driver 连接对应的数据库。其他版本的 Driver 未经测试,可能导致非预期的问题。 + +| Source | JDBC Driver Version | +|:--------:|:--------:| +| MySQL 5.x | mysql-connector-java-5.1.47.jar | +| MySQL 8.x | mysql-connector-java-8.0.25.jar | +| PostgreSQL | postgresql-42.5.1.jar | +| Oracle | ojdbc8.jar| +| SQLServer | mssql-jdbc-11.2.3.jre8.jar | +| Doris | mysql-connector-java-5.1.47.jar / mysql-connector-java-8.0.25.jar | +| Clickhouse | clickhouse-jdbc-0.4.2-all.jar | +| SAP HAHA | ngdbc.jar | +| Trino/Presto | trino-jdbc-389.jar / presto-jdbc-0.280.jar | +| OceanBase | oceanbase-client-2.4.2.jar | + ## 常见问题 1. 除了 MySQL,Oracle,PostgreSQL,SQLServer,ClickHouse,SAP HANA,Trino/Presto,OceanBase 是否能够支持更多的数据库 @@ -799,4 +816,4 @@ DROP CATALOG ; 可以先下载[lz4-1.3.0.jar](https://repo1.maven.org/maven2/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar)包,然后放到DorisFE lib 目录以及BE 的 `lib/lib/java_extensions`目录中(Doris 2.0 之前的版本需放到 BE 的 lib 目录下)。 - 从 2.0.2 版本起,可以将这个文件放置在 FE 和 BE 的 `custom_lib/` 目录下(如不存在,手动创建即可),以防止升级集群时因为 lib 目录被替换而导致文件丢失。 \ No newline at end of file + 从 2.0.2 版本起,可以将这个文件放置在 FE 和 BE 的 `custom_lib/` 目录下(如不存在,手动创建即可),以防止升级集群时因为 lib 目录被替换而导致文件丢失。