junlin40243

Kettle 连接Mysql数据库报错 Error connecting to database: (using class org.gjt.mm.mysql.Driver)

  Kettle连接Mysql数据库的报错,首先我练习用的Kettle版本是5.4,在进行数据连接时,出现了信息开头类似为:

  Error connecting to database [test] : org.pentaho.di.core.exception.KettleDatabaseException:

  Error occured while trying to connect to the database Exception while loading class org.gjt.mm.mysql.Driver     org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to connect to the database

Exception while loading class org.gjt.mm.mysql.Driver 的错误.

  网上的解决方法总结为:

  方法一:下载jar包:mysql-connector-java-5.1.15-bin.jar 放到Kettle安装目录下:

D:\kettle\data-integration\lib 重启Spoon.bat问题解决.(方法来源:https://blog.csdn.net/a15020059230/article/details/72823039)

 

  方法二(方法来源https://blog.csdn.net/quzihen/article/details/73164812):

 

  如果你和我一样,上面的方法都不能解决连接数据库的问题,请注意你的报错信息是否有The server time zone value \'Öйú±ê׼ʱ¼ä\' is unrec,time zone这个很关键的错误提示.有的话,基本锁定是Mysql的时区问题.

show variables like \'%time_zone%\'
set global time_zone=\'+8:00\';

  问题解决.(网上给出Kettle连接Mysql数据库报错的解决方案,基本都是把驱动放在lib目录,请注意自己看报错的信息,根据具体的报错解决问题有时你可能输入的密码错了、数据库为空……)

 

发表于 2018-09-22 21:19  TypeMoon璘  阅读(19186)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2021-10-01
  • 2022-02-15
  • 2021-12-02
  • 2022-12-23
  • 2021-05-10
  • 2022-12-23
  • 2021-05-01
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2021-12-28
  • 2022-01-17
  • 2021-09-06
相关资源
相似解决方案