You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/08 06:55:52 UTC

[GitHub] [doris] BePPPower commented on a diff in pull request #14924: [Docs](jdbc catalog) add docs for jdbc catalog

BePPPower commented on code in PR #14924:
URL: https://github.com/apache/doris/pull/14924#discussion_r1042990981


##########
docs/zh-CN/docs/ecosystem/external-table/multi-catalog.md:
##########
@@ -371,6 +372,100 @@ mysql> select * from test;
     
 之后,可以像正常的 Hive MetaStore 一样,访问 DLF 下的元数据。 
 
+### 连接JDBC
+
+以下示例,用于创建一个名为 jdbc 的 Catalog, 通过jdbc 连接指定的Mysql。
+jdbc Catalog会根据`jdbc.jdbc_url` 来连接指定的数据库(示例中是`jdbc::mysql`, 所以连接MYSQL数据库),当前只支持MYSQL数据库类型。
+```sql
+CREATE CATALOG jdbc PROPERTIES (
+    "type"="jdbc",
+    "jdbc.user"="root",
+    "jdbc.password"="123456",
+    "jdbc.jdbc_url" = "jdbc:mysql://127.0.0.1:13396/demo",
+    "jdbc.driver_url" = "file:/mnt/disk2/ftw/tools/jar/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47.jar",
+    "jdbc.driver_class" = "com.mysql.jdbc.Driver"
+);
+```

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org