[大数据技术]Kettle初次连接MySQL数据库 报错问题 错误连接数据库 Error occured while trying to connect to the database Exception while loading class org.gjt.mm.mysql.Driver

 报错内容如下:

 1 错误连接数据库 [foodmartconn] : org.pentaho.di.core.exception.KettleDatabaseException: 
 2 Error occured while trying to connect to the database
 3 
 4 Exception while loading class
 5 org.gjt.mm.mysql.Driver
 6 
 7 
 8 org.pentaho.di.core.exception.KettleDatabaseException: 
 9 Error occured while trying to connect to the database
10 
11 Exception while loading class
12 org.gjt.mm.mysql.Driver

这是由于缺失

MySQL的jdbc驱动造成的,如我的连接驱动文件为: cloud-mysql-connector-java-5.1.7-bin.jar 

由于版本问题,可依次尝试以下解决方法。

  • 第一种解决方法: 找到D:\data-integration\libext\JDBC,然后把数据库链接驱动添加进去,就ok。 
  • 第二种方法:若没有libext尝试 本地驱动文件放到 data-integration\libswt\win64 文件夹下 
  • 第三种解决方法: 放到data-integration\lib文件夹下 

data-integration为kettle安装目录

接下来重点来了:

切记,要重启spoon,要不然无论你怎么折腾,都会报错!!!!

其他数据库类型同理。

posted @ 2020-02-27 20:57  雾霾王者  阅读(1179)  评论(0编辑  收藏  举报