US and Worldwide: +1 (866) 660-7555
Results 1 to 8 of 8

Thread: [mysql]jdbc

  1. #1
    Join Date
    Aug 2010
    Posts
    5

    Default [mysql]jdbc

    Hi
    i have some problems with the installation of jdbc.

    This is what i've done:

    i've installed:java, apache 2.2, mysql Server 5.1, phpmyadmin, weka-3-6

    i've downloaded: jdbc driver and i copied it in weka-3-6

    i've exctracted the DatabaseUtils.props file from weka,and i edited it in this way:
    # The comma-separated list of jdbc drivers to use
    #jdbcDriver=RmiJdbc.RJDriver,jdbc.idbDriver
    #jdbcDriver=jdbc.idbDriver
    jdbcDriver=org.gjt.mm.mysql.Driver
    #jdbcDriver=org.gjt.mm.mysql.Driver

    # The url to the experiment database
    #jdbcURL=jdbc:rmi://expserver/jdbc:idb=experiments.prp
    #jdbcURL=jdbc:idb=experiments.prp
    #jdbcURL=jdbc:mysql://mysqlserver/username
    jdbcURL=jdbc:mysql://localhost:3306/db_esempio

    and i copied it in weka-3-6

    i edited the classpath: C:\Program Files\Weka-3-6\weka.jar;C:\Program Files\Weka-3-6\mysql-connector-java-5.1.12-bin.jar
    and the path: ;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Weka-3-6;

    when i open the Explorer in weka, click 'open DB', in users insert username and password, click connect and it writes:
    connecting to:jdbc:mysql://localhost:3306/db_esempio = true

    but when i click on 'ok',
    it writes:
    Problem connecting to database: no suitable driver found for

    What's wrong?
    Coul you help me?
    Thank you

    Vale

  2. #2
    Join Date
    Aug 2006
    Posts
    1,450

    Default

    Hi Vale,

    It sounds like the classpath is the issue here. Assuming your modified DatabaseUtils.props and mysql-connector-java-5.1.12-bin.jar are in C:\Program Files\Weka-3-6, can you open a terminal and try:

    1) change directory to C:\Program Files\Weka-3-6
    2) java -cp weka.jar;mysql-connector-java-5.1.12-bin.jar weka.gui.GUIChooser

    Cheers,
    Mark.

  3. #3
    Join Date
    Aug 2010
    Posts
    5

    Default

    Hi Mark,

    thanks for reply

    If i do what you say, weka opens, but then, if i open weka's explorer and i try to connect to the db, it doesn't work

    what could i doin you opinion?

    thank you for your attention

    Vale

  4. #4
    Join Date
    Aug 2006
    Posts
    1,450

    Default

    Hi Vale,

    It still sounds like a classpath problem. Are you sure that the mysql jar file is in the Weka-3-6 directory when you start weka with java -cp weka.jar;mysql-connector-java-5.1.12-bin.jar?

    Cheers,
    Mark.

  5. #5
    Join Date
    Aug 2010
    Posts
    5

    Default

    Hi Mark

    Yes,i am.
    If i look in the weka-3-6 directory i see the mysql-connector-java-5.1.12-bin.jar...

    What could be the problem in your opinion?

    Cheers,
    Vale

  6. #6
    Join Date
    Aug 2006
    Posts
    1,450

    Default

    One last question: did you actually enter an SQL query in the "Query" part of the SQL-Viewer dialog after connecting successfully? If there is no query entered, then I get the same error message that you got (a little confusing I admit :-)) Note that you actually have to execute the query by pressing the "Execute" button before you click "OK" at the bottom of the dialog.

    Cheers,
    Mark

  7. #7
    Join Date
    Aug 2010
    Posts
    5

    Default

    oh Mark!!!i'm so wimp!!!
    you are right!!!I hadn't execute the query by pressing the "Execute" button before clicking "OK" at the bottom of the dialog.
    But now...i have another error:

    Couldn't read from database:
    Unknown data type:INT.Add entry in weka/experiment/DatabaseUtils.props.
    If the type contains blanks either escape them with a blackslash or use underscores instead of blanks

    i read several treads about this error but still cannt find out what is wrong

    Could you help me?
    be patient, please i 'm so confused

    Thank you for all!!

    Cheers,
    Vale

  8. #8
    Join Date
    Aug 2010
    Posts
    5

    Default

    Mark!!
    I solved my problems!!
    thank you for your suggestions!!
    you are the best!

    Take care

    Vale

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •