ZhouYuling commented on issue #2149:
URL: https://github.com/apache/seatunnel/issues/2149#issuecomment-1608805326
解决思路如下:
1.Could not find a suitable table factory,需要检查flink-1.xx.x/lib目录下是否存在jdbc相关包
2.No factory supports all
properties,检查参数是否正确。以flink-1.16.2的jdbc连接mysql为例,我以为的代码:
`CREATE TABLE products (
id INT,
name string,
description string,
PRIMARY KEY (id) NOT ENFORCED
) WITH (
'connector.type'='jdbc',
'connector.url'='jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=UTC',
'connector.table'='products',
'connector.driver'='com.mysql.cj.jdbc.Driver',
'connector.port' = '3306',
'connector.username'='root',
'connector.password'='root'
);`
实际上的代码
`CREATE TABLE products (
id INT,
name string,
description string,
PRIMARY KEY (id) NOT ENFORCED
) WITH (
'connector' = 'jdbc',
'url' =
'jdbc:mysql://localhost:3306/mydb?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=UTC',
'table-name' = 'products',
'username'='root',
'password'='root'
);`
希望对你有帮助
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]