java.net.ConnectException: Connection refused: connect
Posted by: rui ramos
Date: July 19, 2007 05:08AM

I have a ubuntu server with mysql and i'm tring to reach the db from a windows machine but this error is killing me:

init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Rui Farinha\Ambiente de trabalho\teste\build\classes
compile:
run:
SQLException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.ConnectException
MESSAGE: Connection refused: connect

STACKTRACE:

java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:208)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:268)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2745)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at Main.main(Main.java:37)


** END NESTED EXCEPTION **



Last packet sent to the server was 16 ms ago.
SQLState: 08S01
VendorError: 0
BUILD SUCCESSFUL (total time: 1 second)



HELP PLEASE
THANKS

Options: ReplyQuote


Subject
Written By
Posted
java.net.ConnectException: Connection refused: connect
July 19, 2007 05:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.