From aba5f8a40e9b86068cf9bff374bf1842c0beaf3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=BA=E9=98=B3?= Date: Wed, 25 May 2022 14:09:15 +0800 Subject: [PATCH] [improve] Change Mysql Driver (#10220) --- docs/docs/en/development/development-environment-setup.md | 2 +- docs/docs/zh/development/development-environment-setup.md | 2 +- .../src/main/resources/application.yaml | 3 +-- dolphinscheduler-api/src/main/resources/application.yaml | 3 +-- .../data/quality/configuration/ConfigurationParserTest.java | 2 +- .../data/quality/flow/reader/ReaderFactoryTest.java | 2 +- dolphinscheduler-master/src/main/resources/application.yaml | 3 +-- .../src/main/resources/application.yaml | 2 +- dolphinscheduler-tools/src/main/resources/application.yaml | 2 +- dolphinscheduler-worker/src/main/resources/application.yaml | 2 +- 10 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/docs/en/development/development-environment-setup.md b/docs/docs/en/development/development-environment-setup.md index 21bd17f748..4f2dc22e1c 100644 --- a/docs/docs/en/development/development-environment-setup.md +++ b/docs/docs/en/development/development-environment-setup.md @@ -162,7 +162,7 @@ We here use MySQL with database, username, password named dolphinscheduler as an ```application.yaml spring: datasource: - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 username: dolphinscheduler password: dolphinscheduler diff --git a/docs/docs/zh/development/development-environment-setup.md b/docs/docs/zh/development/development-environment-setup.md index 29ef58a240..858e85296c 100644 --- a/docs/docs/zh/development/development-environment-setup.md +++ b/docs/docs/zh/development/development-environment-setup.md @@ -156,7 +156,7 @@ DolphinScheduler 的元数据存储在关系型数据库中,目前支持的关 ```application.yaml spring: datasource: - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 username: dolphinscheduler password: dolphinscheduler diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml index 40e4b78e62..24f14b7a3c 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml +++ b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/resources/application.yaml @@ -66,5 +66,4 @@ spring: activate: on-profile: mysql datasource: - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.cj.jdbc.Driver diff --git a/dolphinscheduler-api/src/main/resources/application.yaml b/dolphinscheduler-api/src/main/resources/application.yaml index 23b93028af..59e28b5064 100644 --- a/dolphinscheduler-api/src/main/resources/application.yaml +++ b/dolphinscheduler-api/src/main/resources/application.yaml @@ -136,8 +136,7 @@ spring: activate: on-profile: mysql datasource: - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.cj.jdbc.Driver quartz: properties: org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate diff --git a/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/configuration/ConfigurationParserTest.java b/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/configuration/ConfigurationParserTest.java index ccc2745232..3fb579da76 100644 --- a/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/configuration/ConfigurationParserTest.java +++ b/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/configuration/ConfigurationParserTest.java @@ -38,7 +38,7 @@ public class ConfigurationParserTest { try { String parameterStr = "{\"name\":\"data quality test\",\"env\":{\"type\":\"batch\",\"config\":null}," + "\"readers\":[{\"type\":\"JDBC\",\"config\":{\"database\":\"test\",\"password\":\"Test@123!\"," - + "\"driver\":\"com.mysql.jdbc.Driver\",\"user\":\"test\",\"output_table\":\"test1\",\"table\":\"test1\"," + + "\"driver\":\"com.mysql.cj.jdbc.Driver\",\"user\":\"test\",\"output_table\":\"test1\",\"table\":\"test1\"," + "\"url\":\"jdbc:mysql://172.16.100.199:3306/test\"} }],\"transformers\":[{\"type\":\"sql\",\"config\":" + "{\"index\":1,\"output_table\":\"miss_count\",\"sql\":\"SELECT COUNT(*) AS miss FROM test1 WHERE (c1 is null or c1 = '') \"} }," + "{\"type\":\"sql\",\"config\":{\"index\":2,\"output_table\":\"total_count\",\"sql\":\"SELECT COUNT(*) AS total FROM test1 \"} }]," diff --git a/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/flow/reader/ReaderFactoryTest.java b/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/flow/reader/ReaderFactoryTest.java index b428da9460..a0726589dd 100644 --- a/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/flow/reader/ReaderFactoryTest.java +++ b/dolphinscheduler-data-quality/src/test/java/org/apache/dolphinscheduler/data/quality/flow/reader/ReaderFactoryTest.java @@ -54,7 +54,7 @@ public class ReaderFactoryTest { config.put(URL,"jdbc:mysql://localhost:3306/test"); config.put(USER,"test"); config.put(PASSWORD,"123456"); - config.put(DRIVER,"com.mysql.jdbc.Driver"); + config.put(DRIVER,"com.mysql.cj.jdbc.Driver"); readerConfig.setConfig(config); readerConfigs.add(readerConfig); diff --git a/dolphinscheduler-master/src/main/resources/application.yaml b/dolphinscheduler-master/src/main/resources/application.yaml index 0b6b3c811e..e353bb8dcc 100644 --- a/dolphinscheduler-master/src/main/resources/application.yaml +++ b/dolphinscheduler-master/src/main/resources/application.yaml @@ -135,8 +135,7 @@ spring: activate: on-profile: mysql datasource: - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 + driver-class-name: com.mysql.cj.jdbc.Driver quartz: properties: org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate diff --git a/dolphinscheduler-standalone-server/src/main/resources/application.yaml b/dolphinscheduler-standalone-server/src/main/resources/application.yaml index 982ee681dd..980a088267 100644 --- a/dolphinscheduler-standalone-server/src/main/resources/application.yaml +++ b/dolphinscheduler-standalone-server/src/main/resources/application.yaml @@ -205,7 +205,7 @@ spring: init: schema-locations: classpath:sql/dolphinscheduler_mysql.sql datasource: - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 username: root password: root diff --git a/dolphinscheduler-tools/src/main/resources/application.yaml b/dolphinscheduler-tools/src/main/resources/application.yaml index 45327b5848..8d36a365f4 100644 --- a/dolphinscheduler-tools/src/main/resources/application.yaml +++ b/dolphinscheduler-tools/src/main/resources/application.yaml @@ -42,7 +42,7 @@ spring: activate: on-profile: mysql datasource: - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver --- spring: diff --git a/dolphinscheduler-worker/src/main/resources/application.yaml b/dolphinscheduler-worker/src/main/resources/application.yaml index 78965d237c..dd353f0495 100644 --- a/dolphinscheduler-worker/src/main/resources/application.yaml +++ b/dolphinscheduler-worker/src/main/resources/application.yaml @@ -98,4 +98,4 @@ spring: activate: on-profile: mysql datasource: - driver-class-name: com.mysql.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver