Installing the MySQL JDBC Driver
Due to licensing issues, JDBC drivers are not included with the Teiid Designer installation. However, valid drivers are required to import from JDBC data sources or to create source connections for data preview and VDB execution. This document provides instructions on how to install a sample JDBC driver to get you started.
Download MySQL drivers
- Visit the MySQL (www.mysql.com) Web site
- Go to their Downloads page
- Select, and go to, the Connectors page
- Go to the Connector/J page
- Select the download you want (.tar.gz or .zip)
- Follow the instructions to download the connector software.
Once downloaded, extract the actual .jar file (for example, mysql-connector-java-5.1.7-bin.jar) from the downloaded archive. Place it in a location you can access from Teiid Designer.
Install MySQL drivers into Designer
- Start Teiid Designer
- Choose an open project, or create a new one (this will not change the project)
- Select File > Import... action
- Choose to import Metadata from JDBC Database option
- Click Next>
- Click the Sources... button
- On the Update JDBC source configurations page, click Add to create new Source Configuration
- Click the Drivers... button to launch the JDBC Driver Configurations wizard
- Select the MySQL Driver Configuration
- In the Libraries section, click Add External... button
- Navigate to and select driver jar file you extracted earlier from your .tar.gz or .zip file and click OK
- Click Update button to load the available driver class names from the jar
- Use the combo box to select, “com.mysql.jdbc.Driver”
- Click OK
At this point you have added the new driver.
You may continue to import a database's metadata, or go to another activity. However, by completing the import, Designer will also create the connector binding required to perform queries via the preview data feature or through VDB execution, .
If you choose to not complete the import and wish to perform queries on your data, you'll need to create a connector using the steps below then bind your model to your new connector.
- Select the MySql JDBC Connector in the Connectors view
- Right-click select the New or choose the Create new connector action in the view's toolbar to open the New Connector dialog
- Specify unique Name
- Supply missing <host> and <databaseName> in JDBC URL template.
- Set User Name and Password
- Select Class Path property and open the Connector Classpath Editor
- Navigate to and select driver jar file you extracted earlier from your .tar.gz or .zip file and click OK
- Click OK to save the new connector.
- If all supplied information is valid the connector is ready for use
In addition to MySQL, there are several other JDBC driver templates available in Teiid Designer. The following is a full lis:
- Apache Derby Embedded
- Apache Derby Network
- DB2
- Microsoft Access
- Microsoft Excel
- MySQL
- ODBC via DSN
- Oracle
- PostgresSQL
- SQL Server
Links
Related Documents
Comments