diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/oceanbase/OceanBaseJdbcUtils.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/oceanbase/OceanBaseJdbcUtils.java index bc2f7ae4403..d2e2ecd7629 100644 --- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/oceanbase/OceanBaseJdbcUtils.java +++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/oceanbase/OceanBaseJdbcUtils.java @@ -20,6 +20,7 @@ import org.apache.inlong.manager.common.util.UrlVerificationUtils; import org.apache.inlong.manager.pojo.sink.oceanbase.OceanBaseColumnInfo; import org.apache.inlong.manager.pojo.sink.oceanbase.OceanBaseTableInfo; +import org.apache.inlong.manager.pojo.util.MySQLSensitiveUrlUtils; import com.google.common.collect.Lists; import org.apache.commons.lang3.StringUtils; @@ -75,6 +76,8 @@ private static Connection establishDatabaseConnection(String url, String user, S throw new Exception("OceanusBase URL is invalid, it should start with jdbc:oceanbase"); } try { + UrlVerificationUtils.extractHostAndValidatePortFromJdbcUrl(url, OCEANBASE_JDBC_PREFIX); + url = MySQLSensitiveUrlUtils.filterSensitive(url); Class.forName(OCEANBASE_DRIVER_CLASS); conn = DriverManager.getConnection(url, user, password); } catch (Exception e) {