Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql的连接无法设置一些参数 #674

Closed
zackyoungh opened this issue Dec 2, 2021 · 10 comments
Closed

mysql的连接无法设置一些参数 #674

zackyoungh opened this issue Dec 2, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@zackyoungh
Copy link

代码如下

public static final String JDBC_URL_PATTERN =
            "jdbc:mysql://%s:%s/?useInformationSchema=true&nullCatalogMeansCurrent=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=CONVERT_TO_NULL";

如果我想加上userSSL=false,这时候应该怎么弄;
不让老是碰到

No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

得手动修改java.security才能解决

希望这连接参数配置优化一下

@zackyoungh zackyoungh added the enhancement New feature or request label Dec 2, 2021
@leonardBang
Copy link
Contributor

It makes sense to me, could you change the title and description in English ?

@ashulin
Copy link
Member

ashulin commented Jan 20, 2022

I have the same requirement,maybe we can add a connection.pool.url.* options similar to debezium.*;

@miaogr86
Copy link

image

image

@leonardBang 数据库连接地址上增加userSSL=false 可以解决,但是怎么可以增加这个参数

@qq443672581
Copy link

  1. 下载对应版本的源码
  2. 找到 PooledDataSourceFactory 添加useSSL=false 参数
  3. flink-connector-mysql-cdc 模块下 mvn spotless:apply
  4. flink-connector-mysql-cdc 模块下 mvn install 替换maven仓库中官方的jar即可

@paul8263
Copy link
Contributor

paul8263 commented Mar 8, 2022

Hi @leonardBang ,
This issue is related to #674

I think we should allow user to add or even customize the JDBC URL parameters by configurations.

I'd like to help . Could you please assign this issue to me?

@paul8263
Copy link
Contributor

paul8263 commented Mar 9, 2022

Hi @leonardBang ,
Considering #674 , can we only set

useInformationSchema=true&nullCatalogMeansCurrent=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8

as mandatory parameters and

zeroDateTimeBehavior=CONVERT_TO_NULL

as the default optional value?
Thus the user will be able to overwrite 'zeroDateTimeBehavior=CONVERT_TO_NULL' and add custom ones so that those compatibility issues can be avoided.

@leonardBang
Copy link
Contributor

Could you use English for better communication? feel free to reopen once updated the description.

@ruanhang1993
Copy link
Contributor

When fix the bug #1188, I find that the jdbc properties are not set to the connection rightly. This issue should be reopened and fixed again.

@ruanhang1993
Copy link
Contributor

I am willing to help to fix this ticket and add some IT tests.

@leonardBang
Copy link
Contributor

Thanks @ruanhang1993 for taking this, I've assigned this ticket to you.

ruanhang1993 added a commit to ruanhang1993/flink-cdc-connectors that referenced this issue May 25, 2022
ruanhang1993 added a commit to ruanhang1993/flink-cdc-connectors that referenced this issue May 25, 2022
ruanhang1993 added a commit to ruanhang1993/flink-cdc-connectors that referenced this issue Jul 29, 2022
ruanhang1993 added a commit to ruanhang1993/flink-cdc-connectors that referenced this issue Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants