Problem connecting with database in phpmyadmin

Hi, I just started using KNIME and since this is the first time i’m using a mining tool, i really need your help!
I use Wamp server, with php and Apache and i uploaded my databse in phpmyAdmin (ver 3.2.0.1).
In order to connect with my database through knime i use the node Database REader. I tried to import the JDBC MySql Driver but when i tried to load it through that node, i got an error message that the .jar file was not a valid xml file.
Anyway, after several restarts i finally got some new options for the database driver (in the database reader node) and i use this one: com.mysql.jdbc.Driver. Then for my database url the only 2 options that gave me a more encouraging result are these: 1)jdbc:mysql://@localhost:80/database_name and 2)jdbc:mysql://@phpmyadmin:80/database_name.The message that i take after using it is the one below and in the end i cannot connect with my database:

WARN Database Reader java.sql.SQLException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

If I dont use the “@” i get a TimeoutException error… Can anyone tell me what i’am doing wrong?
I use knime-2.1.2-win32.win32.x86 with alll the available updates.

Hi Staxtes,
The correct URL is

jdbc:mysql://host:port/database_name

I guess, this is the one you have already tried using port 80? Can you please double-check if this is the correct port, the default is usually 3306.
Thanks! Thomas

Dear Thomas,
Thank you for your reply!
Yes that’s the url i used…
Trying 3306: If i use “localhost” as a port i still get a TimeoutException and if i use “@localhost” it’s the same message about the packet(Communications link failure AND The driver has not received any packets from the server).
Also, when trying to connect, as a user I enter the localhost id (127.0.0.1) and the password that i have set. And in the Sql statement this: SELECT * FROM table_name.
Any ideas?

Thanx!! Staxtes

One more question, that might be relevant to my problem… Does “The Network Connections preference page” need to be configured?
It is set to "Direct connection to the Internet " but as i see it has other options there too…
Should i start testing different kind of connections with their corresponding ports?
In the “Manual proxy configuration” it says “No Proxy for” and the hosts are localhost and 127.0.0.1, so they should connect by default, right? Should i change anything there?

Thanx!

One last thing…
After restarting and refreshing the workflow I entered :
jdbc:mysql://localhost:3306/database_name and now the error is : access denied… So i guess this has to do with the fact that the user name and password may not correspond to the right ones?

Ok problem solved :smiley: the port is the one you suggested (3306) and the problem was that phpmyadmin did not give the option to enter the password…Now the connection seems to work…
Thanx !

Hi Staxtes,

I’m currently having trouble connecting to phpMyAdmin. I’m using Java too, and i would like to ask you for help in determining the correct code for connecting to phpMyAdmin by using JDBC.

I have a desktop application which i want to connect to a phpMyAdmin client that’s connected to a server with MySQL. (Web Server: MySQL client version: 5.0.51a) Got any ideas?

(I ran into this post while Google-ing a solution to my problem so i thought i’d give it a try and post)

Thank you for your time! :slight_smile:

Hi flex,
I’m sorry I haven’t replied for so long. As long as I remember, for my connection with phpMyAdmin I confused a lot of things and finally I used the same code for both MySQL and phpMyAdmin to make it work… But i think that you only need to know the one for phpMyAdmin in order to connect from any other application…
Thanx, Staxtes :slight_smile: