WEKA Explorer can't open a connection to MySQL.
connecting to: jdbc:mysql://MYSERVER:3306/NAME = true
by the way: mysql driver was downloaded mysql-connector-java-5.1.14-bin & classpath was set.
(User & Pass are ok because it works with MySQL Workbench)
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 version is 3.6.3.
any suggestions ?
Wasted half an hour on this same problem, here's the answer:
Download the connector from http://dev.mysql.com/downloads/connector/j/
Extract the JAR file.
Edit C:\Program Files\Weka-3-6\RunWeka.ini
Change last line to:
cp=%CLASSPATH%;c:/mysql-connector-java-5.1.16-bin.jar
You may of course save your mysql-connector jar to a different path, but mind the forward slash, nevermind being on Windows.
I solved this problem along the day. The solution took me hours. If you are in ubuntu or debian-based linux, first install mysql-connector-java
with:
sudo apt install libmysql-java
It will install mysql-connector-java-* links in /usr/share/java/mysql-connector-java.jar
#!/bin/bash
# Path to weka.jar
CP=$CLASSPATH:/usr/share/java/:/usr/share/java/weka.jar:/usr/share/java/mysql-connector-java.jar
# start Explorer
java -cp $CP -Xmx500m weka.gui.GUIChooser
I replaced /usr/bin/weka
with the script above. Maybe could save hours for people like me. Another option is edit your desktop menu with:
java -cp "/usr/share/java/mysql.jar:/usr/share/java/weka.jar" -Xmx500m weka.gui.GUIChooser
(in my case mysql.jar links the correct version of the driver)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With