创建数据库连接报错
在使用kettle创建数据库连接时,报如下错误:
错误连接数据库 [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.
org.gjt.mm.mysql.Driver
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
错误原因
新安装的kettle没有配置mysql数据库驱动包,导致kettle无法连接到数据库。
解决办法
a、下载mysql驱动包。经测试, kettle8.2可兼容使用的mysql最新驱动为mysql-connector-java-5.1.46-bin.jar ,请务必注意驱动版本号,否则还是会报找不到驱动的错误。
b、将对应的mysql驱动包放到下kettle的目录下:
\pdi-ce-7.1.0.0-12\data-integration\lib
或\pdi-ce-7.1.0.0-12\data-integration\libswt\win64:(64位系统)
c、重新启动kettle并配置数据库连接
kettle下载
kettle8.2(pdi-ce-8.2.0.0-342)下载链接:https://pan.baidu.com/s/1Vyxxr7DXMu6O791SSWhCYw
提取码:nylg