Pentaho Data Integration SQL connection
Missing driver file.
This error is really common for people just getting started with PDI.
Drivers go in \pentaho\design-tools\data-integration\libext\JDBC for PDI. If you are using other tools in the Pentaho suite, you may need to copy drivers to additional locations for those tools. For reference, here are the appropriate folders for some of the other design tools:
- Aggregation Designer: \pentaho\design-tools\aggregation-designer\drivers
- Metadata Editor: \pentaho\design-tools\metadata-editor\libext\JDBC
- Report Designer: \pentaho\design-tools\report-designer\lib\jdbc
- Schema Workbench: \pentaho\design-tools\schema-workbench\drivers
If this transformation or job will run on another box, such as a test or production server, don't forget to include copying the jar file and restarting PDI or the Data Integration Server in your deployment considerations.
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 database
Exception 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
Turns out I will missing a class called mysql-connector-java-5.1.2.jar, I added it this folder (C:\Program Files\pentaho\design-tools\data-integration\lib) and it worked with a MySQL connection and my data and tables appear.