MySQL Forums
Forum List  »  Spanish

Re: Conectarme una BD en MySQL desde Java(remotamente)
Posted by: Federico Martinez
Date: November 05, 2006 03:04PM

Hola que tal William gracias por tu respuesa tan rapida...bueno he intentado como has mencioando, la prueba la hice desde la misma compu donde esta la BD, pero cambie localhost por mi IP

##################################
Connection con = DriverManager.getConnection("jdbc:mysql://189.145.185.182:3306/prueba", "user", "pass");
##################################

pero aun asi me manda el mismo error...


##################################
Exception: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection timed out: conne
ct
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja
va:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2666)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at JdbcE.main(JdbcE.java:11)


** END NESTED EXCEPTION **



Last packet sent to the server was 16 ms ago.
##################################


COMO LO PUEDO RESOLVER...SEGUN YO DEBERIA FUNCIONAR COMO DICES...no se si tenga que habilitar algun puerto en mi router o como le hago :s



Edited 1 time(s). Last edit at 11/05/2006 03:05PM by Federico Martinez.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Conectarme una BD en MySQL desde Java(remotamente)
6035
November 05, 2006 03:04PM


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.