Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决

时间:2024-03-15 07:22:33

在用Kettle创建数据库连接时,遇到这样一个问题,在设置好连接参数后,点击“测试”:

Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决

报错“

错误连接数据库 [mysql_test] : 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.

Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决

应该是Kettle缺少数据库连接jar包,可以在官网下载jar包

https://downloads.mysql.com/archives/c-j/

一开始考虑到本机MySql装的是8.0本版, 所以就下了8.0jar包

Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决

将数据库驱动包放置在data-integration\lib\ 目录下 ,重启Spoon.bat,发现还是报同样的错误

后来尝试下了低版本的驱动,5.1.48,将mysql-connector-java-5.1.48-bin.jar放入data-integration\lib\ 目录下

Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决

再重启Spoon.bat,测试连接,可行。

 

Kettle连接MySQL错误连接数据库 [mysql_test] : org.pentaho.di.core.exception.KettleDatabaseException 问题解决