kettle指定com.mysql.cj.jdbc.Driver驱动类链接mysql数据库

时间:2024-03-16 16:36:11

使用Java执行kettle脚本报错:

错误连接数据库 [mysql_rollback] : org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
org.gjt.mm.mysql.Driver


org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

Driver class 'org.gjt.mm.mysql.Driver' could not be found, make sure the 'MySQL' driver (jar file) is installed.
org.gjt.mm.mysql.Driver

确保Java环境中的mysql数据库驱动存在,kettle中的mysql 数据库类型使用MySQL5之前的驱动,现在已经完全没有人用了,使用最新的kettle8 在最新驱动放在lib文件夹下进行链接测试仍然会出现错误(一直去找org.gjt.mm.mysql.Driver驱动类,原因不明,有时间看一下源码)。

使用MySQL数据库可以绕过这个问题:选择Generic database

kettle指定com.mysql.cj.jdbc.Driver驱动类链接mysql数据库