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目錄,請注意自己看報錯的信息,根據具體的報錯解決問題有時你可能輸入的密碼錯了、數據庫為空……)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM