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.
find some introduction to WEKA and the environment variable: http://weka.wikispaces.com/CLASSPATH
For Weka 3.7.10, the classpath system environment variable is not took into account (at leat under Windows 7). The only working approach for me was to modify the
RunWeka.ini
file from the Weka installation folder as follows: thecp=
setting was modified to:whereas only the
%CLASSPATH%;
setting was originally provided. Does not make much sense, but in worked.Copy mysql-connector-java-X.X.XX-bin.jar to /usr/share/java/ unizip /usr/share/java/weka.jar
edit: /usr/share/java/weka/experiment/DatabaseUtils.props
add: jdbcDriver=com.mysql.jdbc.Driver jdbcURL=jdbc:mysql://localhost:3306/test (with your server)
add shell export CLASSPATH=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar: export CP=/usr/share/java/mysql-connector-java-X.X.XX-bin.jar::/usr/share/java/:/usr/shared/java/weka.jar
execute weka:
java -cp $CP -Xmx500m weka.gui.explorer.Explorer
Ready
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
then click open DB and
Click Execute. The result window should show the results now.