如何通过KNIME首选项将新驱动程序添加到数据库中?一般来说,
File-> Preferences -> Add File/ Add Directory
接受的文件仅为*.jar
或*.zip
。
我的问题
我已将ODBC64
安装到我的电脑上。现在我需要将该文件添加到knime
首选项中,并使用Driver into Database Connector节点。
jdbc:mysql://host:port/database_name
的含义是什么
主机和端口?有人可以简单解释一下并帮助我吗?
答案 0 :(得分:0)
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:
Download the jdbc driver (e.g. 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.
In the database URL, you need to change those parts in <>
- i.e. 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, e.g. 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
答案 1 :(得分:0)
KNIME的最新版本基于Java 8,dropped support for ODBC,因此您应首先找到数据库的替代驱动程序,并且只有在您使用KNIME连接到驱动程序后才能使用KNIME documentation page for DB connectors
答案 2 :(得分:0)
您有几个节点,可让您连接到数据库(尤其是MySQL)。 我记得有一个专用的MySQL节点用于与数据库连接。 只要记住这一点:您必须输入IP地址:端口,然后插入凭据并指向默认情况下要打开的数据库。