Hi,

mysql-connector-java-5.1.38.jar 应该已经包含了 com.mysql.jdbc.Driver 才对;Flink
是以什么模式运行的呢?如果是 standalone session,在 Flink 的 lib 下添加 jar 包之后是否重启过 session
集群呢?另外是否所有的 worker 都添加了 jar 包呢?如果能打出完整的错误栈会更好。

op <520075...@qq.com> 于2020年7月27日周一 下午2:45写道:

> 您好,我创建了一个jdbc的表
>
>
> CREATE TABLE mvp_dim_anticheat_args_all (
> &nbsp; &nbsp; id BIGINT,
> &nbsp; &nbsp; dt STRING,
> &nbsp; &nbsp; cnt_7d INT,
> &nbsp; &nbsp;cnt_30d INT,
> &nbsp; PRIMARY KEY (id) NOT ENFORCED
> ) WITH (
> &nbsp; &nbsp;'connector' = 'jdbc',
> &nbsp; &nbsp;'driver'='com.mysql.jdbc.Driver',
> &nbsp; &nbsp;'url' = 'jdbc:mysql://localhost:3306/huyou_oi',
> &nbsp; &nbsp;'table-name' = 'mvp_dim_ll',
> &nbsp; &nbsp;'username' = 'huy_oi',
> &nbsp; &nbsp;'password' = '420123'
> );
>
>
>
> 查询的时候报&nbsp;
> [ERROR] Could not execute SQL statement. Reason:
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
>
>
>
>
>
> 我的安装目录lib下面有&nbsp;flink-connector-jdbc_2.11-1.11.0.jar
> 和&nbsp;mysql-connector-java-5.1.38.jar 这俩,请问是什么原因??
> 谢谢

回复