威卡&MySQL 建立连接

2022-01-24 00:00:00 connection weka mysql

WEKA Explorer 无法打开与 MySQL 的连接.

WEKA Explorer can't open a connection to MySQL.

连接到:jdbc:mysql://MYSERVER:3306/NAME = true

顺便说一句:mysql驱动已下载mysql-connector-java-5.1.14-bin &类路径已设置.

by the way: mysql driver was downloaded mysql-connector-java-5.1.14-bin & classpath was set.

(用户和密码都可以,因为它适用于 MySQL Workbench)

(User & Pass are ok because it works with MySQL Workbench)

单击 JButton OK(以打开 DB"的形式)时,消息框会显示错误- 见图片:

when clicking on the JButton OK (in the form 'Open DB'), then a message box shows an error - see image:

(屏幕截图显示臭名昭著的无驱动程序"错误)

(screen shot shows infamous "no driver" error)

weka 版本是 3.6.3.

weka version is 3.6.3.

有什么建议吗?

推荐答案

在同样的问题上浪费了半个小时,这是答案:

Wasted half an hour on this same problem, here's the answer:

从 http://dev.mysql.com/downloads/connector/j 下载连接器/

解压 JAR 文件.

编辑C:Program FilesWeka-3-6RunWeka.ini

将最后一行改为:

cp=%CLASSPATH%;c:/mysql-connector-java-5.1.16-bin.jar

您当然可以将 mysql-connector jar 保存到不同的路径,但请注意 正斜杠,不要介意在 Windows 上.

You may of course save your mysql-connector jar to a different path, but mind the forward slash, nevermind being on Windows.

相关文章