简体   繁体   中英

Knime with database

How to add new driver into database through KNIME preferences? Generally,

File-> Preferences -> Add File/ Add Directory

The files accepted are only of *.jar or *.zip .

MY QUESTION

I have installed ODBC64 into my PC. Now I need to add that file into knime preferences and use the Driver into Database Connector node.

  • How to add and use the file into my Knime?
  • And What is meant by Database URL jdbc:mysql://host:port/database_name
    Host and port?

Can anyone please briefly explain and help me out?

I'm assuming based on your database URL of jdbc:mysql:// that you are wanting to connect to a MySQL database? Based on that, then there is a thread on the KNIME forum which explains pretty much all of your question, but the process is the same for any other sort of database. The steps are as follows:

  1. Download the jdbc driver (eg from https://dev.mysql.com/downloads/connector/j/ for MySQL) - NB KNIME now comes bundled with several drivers already installed - MySQL is one of those - in the Database Connector node the drivers installed are listed.

  2. In the database URL, you need to change those parts in <> - ie the hostname, port number and database name. Hostname may be localhost if it is a local database. The port number you will need to find from your database administrator, or will be what you set it up to be if you are running a local database (3306 is the default for MySQL), so for a database called 'myDB' on the default port on your local machine, the url should be jdbc:mysql://localhost:3306/myDB

For some of the shipped drivers, there are also connector nodes, eg MySQL Connector, SQLite Connector, PostgreSQL Connector etc, which still require the server name/port and database name, but take them as individual inputs rather than requiring editing of the URL

KNIME的最新版本基于Java 8,该版本放弃了对ODBC的支持 ,因此,只有在您可以按照数据库连接器KNIME文档页面上的说明使用KNIME连接该数据库之后,才应该首先找到数据库的替代驱动程序。

You have several nodes which allow you to connect to a DB (especially MySQL). I remember there was a dedicated MySQL node for connecting with the DB. Just remember this: you have to input the IP adress : port, then insert credentials and point to the DB you want to open by default.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM