Connecing to MySQL on a PC

7 posts / 0 new
Last post
HGLuterMusic
Offline
Joined: 04/11/2010
Connecing to MySQL on a PC

I just got started with KNIME. I have a MySQL database on my PC, and want to connect KNIME to the db so that I can work with the tables. I can't connect with the db. I've configured the KNIME db reader using both jdbc:mysql://localhost:3306/mydb and jdbc:mysql://127.0.0.1:3306/mydb, but I get the error message: WARN Database Reader java.sql.SQLException: org.knime.core.node.InvalidSettingsException: Driver "sun.jdbc.odbc.JdbcOdbcDriver" does not accept URL: jdbc:mysql://localhost:3306/mydb. I'm using the driver sun.jdbc.odbc. JdbcOdbcDrive. What am I doing wrong?

Max
Offline
Joined: 06/21/2007

Hi,

Are you registred MySQL driver at File->Preferences->KNIME->DataBase Driver page? If registred, are you select this driver when configure node in Database Driver list at the top of "Settings" tab?

Hope, it helps,

Max

HGLuterMusic
Offline
Joined: 04/11/2010

No I'm not registered. Where do I download the driver?

Max
Offline
Joined: 06/21/2007

You can go here: http://www.mysql.com/downloads/connector/j/ and download archive. Unzip and choose mysql-connector-java-5.1.13-bin.jar in registering driver procedure, and org.git.mm.mysql.Driver when configure node. It's work in my case.

Best regards,

Max

HGLuterMusic
Offline
Joined: 04/11/2010

Thanks Max. It's getting better. I have the driver listing now. I connect to the database via TCP/IP. How do I enter that protocol? It did not work when I used TCP/IP or TCPIP.

Max
Offline
Joined: 06/21/2007

Sorry, can you give more info? Where are you use tcpip word?

Are you test connection with connection string (database url) from first post? 

In the first post you are used connection string like jdbc:mysql://localhost:3306/yourdbname. Just choose driver and test connection with the same connection string.

Best regards, Max

mzone (not verified)

Thanks Max. Your answer is very useful.