Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with mm.mysql.jdbc-1.2c Driver

3 views
Skip to first unread message

Janne Ylinen

unread,
Sep 25, 2000, 3:00:00 AM9/25/00
to
Hello!

I'm using mm.mysql.jdbc-1.2c driver to connect my MySQL DB via java
application. All works fine when I'm running the application on an
another machine. But when I try to run the application locally (on the
machine where the MySQL server runs) it can't connect the DB. The java
virtual machine casts an exception:
-----------------
java.net.NoRouteToHostException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:301)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:121)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:108)
at java.net.Socket.<init>(Socket.java:265)
at java.net.Socket.<init>(Socket.java:94)
at org.gjt.mm.mysql.MysqlIO.<init>(MysqlIO.java:114)
at org.gjt.mm.mysql.Connection.<init>(Connection.java:229)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:453)
at java.sql.DriverManager.getConnection(DriverManager.java:133)
at Konne.<init>(Konne.java:13)
at Konne.main(Konne.java:22)

java.sql.SQLException: Cannot connect to MySQL server on "my server
name". Is there a MySQL server running on the machine/port you are
trying to connect to? (java.net.NoRouteToHostException)
at org.gjt.mm.mysql.Connection.<init>(Connection.java:239)
at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:453)
at java.sql.DriverManager.getConnection(DriverManager.java:133)
at Konne.<init>(Konne.java:13)
at Konne.main(Konne.java:22)
---------------------
There IS server running and it can't be a matter of security because I
can connect the DB locally using mysql-client program with same username
and password. What could be wrong? A help would be preciated.

Thank you for your help!

J. Ylinen


AV

unread,
Sep 25, 2000, 3:00:00 AM9/25/00
to
try the following addresses, all of them are supposed
to be loopback to local processes:
(i) 127.0.0.1
(ii) local
(iii) localhost
do not forget port address if necessary

AlexV

"Janne Ylinen" <jam...@cc.jyu.fi> wrote in message
news:39CF20B4...@cc.jyu.fi...

0 new messages