I just came across the same issue while trying to query a MySQL Database from Pentaho.
Error connecting to database [Local MySQL DB] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occured while trying to connect to the databaseException while loading class
org.gjt.mm.mysql.Driver
Expanding post by @user979331 the solution is:
- Download the MySQL Java Connector / Driver that is compatible with your kettle version
- Unzip the zip file (in my case it was mysql-connector-java-5.1.31.zip)
-
copy the .jar file (mysql-connector-java-5.1.31-bin.jar) and paste it in your Lib folder:
PC: C:\Program Files\pentaho\design-tools\data-integration\lib
Mac: /Applications/data-integration/lib
Restart Pentaho (Data Integration) and re-test the MySQL Connection.
Additional interesting replies from others that could also help:
- think to download the good JDBC driver version, compatible with your
PDI version:
https://help.pentaho.com/Documentation/8.1/Setup/JDBC_Drivers_Reference#MY_SQL - take the zip version (“platform independant”) to extract the jar file
- take into lib folder
- see also proper way to handle it proposed by Ryan Tuck