如何在Weka中连接MySQL数据库? [英] how to connect mysql databases in weka?

查看:217
本文介绍了如何在Weka中连接MySQL数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在weka中使用我的mysql数据库来分析数据. 我下载了mysql-connector-java-5.0.8-bin.jar并将其放在我的程序Files文件夹中的weka文件夹中,并将此路径添加到系统变量路径,但是当我打开weka Explorer并单击openDB时,我不知道我应该在url文本框中写什么, 我完全不知道该怎么办? 我看到的错误是:

i want to use my mysql databases in weka in order to analysis data. i download the mysql-connector-java-5.0.8-bin.jar and put that in weka folder in my program Files folder, and add this path to system variable path, but when i open the weka explorer and click the openDB, i don't know what should i write in the url textbox, i don't know completely what should i do? the error that i saw is:

连接数据库的问题: 找不到合适的驱动程序!

problem connecting to database: no suitable driver found for!

请给我一个总体指导,在此先感谢.

please give me a total guidance, thanks in advance.

推荐答案

将mysql-connector-java-5.1.12-bin.jar添加到CLASSPATH中. 或将其放在weka文件夹中,导航到weka安装文件夹并运行命令:

add mysql-connector-java-5.1.12-bin.jar to CLASSPATH . or put it in weka folder, navigate to weka installation folder and run command :

%java_home%/bin/java -Xmx300M -cp.; weka.jar; mysql-connector-java-5.1.12-bin.jar;" weka.gui.GUIChooser

%java_home%/bin/java -Xmx300M -cp ".;weka.jar;mysql-connector-java-5.1.12-bin.jar;" weka.gui.GUIChooser

然后单击打开数据库并

  • 填写正确的用户名和密码
  • 输入网址:jdbc:mysql://localhost:3306/数据库名称

单击执行.结果窗口现在应该显示结果.

Click Execute. The result window should show the results now.

这篇关于如何在Weka中连接MySQL数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆