If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Remote Connect problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-09-04, 00:07
Sanki Poon Sanki Poon is offline
Registered User
 
Join Date: Sep 2004
Posts: 2
Remote Connect problem

Hi All,

I'm new Java and Mysql Programmer and have a big problem to remote connect Mysql Server by following Setting:

1. Server Computer : Linux 9.0 with LAN IP : 10.2.112.100 / 255.255.255.0
2. Router Setting LAN IP MAP with True IP : 218.111.231.22 /255.255.255.240
3. Server Installed : MySQL, Java SDK 1.4 and JRE 1.4 with Java-web Start JNLP

Problem :
1. We can access MySQL internal with Client in LAN IP
2. Once i came home and remote connect by True IP the following message occur.

My Connect Message -----------------------------------------------
Connection c = DriverManager.getConnection(
"jdbc:mysql://218.111.231.22:3306/IOP?user=mysql&password=admin");
---------------------------------------------------------------------

Error Message -----------------------------------------------------
SQLException Status : SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect

** 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(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:121)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:219)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:1771)
at com.mysql.jdbc.Connection.<init>(Connection.java:4 40)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:400)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
...........
** END NESTED EXCEPTION **
SQLStatus : SQLState: 08S01
Vendor Status : VendorError: 0
----------------------------------------------------------------------------
Thanks
Sanki Poon
Reply With Quote
  #2 (permalink)  
Old 09-09-04, 01:54
divined divined is offline
Registered User
 
Join Date: Apr 2004
Posts: 110
Are you sure the router is not blocking the connection from the WAN to the LAN?

George Papadopoulos
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On