Re: Troubleshooting a JDBC connection

Justis Peters <[email protected]>
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
Robert (the OP),

What you probably want is SSH port forwarding. Can you get an SSH 
connection to the host? If so, you want to run something along the lines 
of this:
  ssh -L 3306:localhost:3306 myuser-SPXQTMr/SINWk0Htik3J/[email protected]

That will take all traffic that is directed at port 3306 on your local 
computer and send it to localhost:3306 on the remote host 
(somehost.com). Then, you can point eclipse to an instance of mysql 
which appears to be running on localhost, even though it's remote. If 
you build this tunnel often, you might consider automating this 
connection and having it fork into the background.

These articles appear decent, if you want some more details:
  http://www.securityfocus.com/infocus/1816
  http://www.onlamp.com/pub/a/onlamp/excerpt/ssh_11/index3.html
  
http://www.ssh.com/support/documentation/online/ssh/adminguide/32/Port_Forwarding.html

Kind regards,
Justis Peters

T.A. Nguyen wrote:
> The other things is about hosted environment is that if your database
> happen to be on the same server, you should always use the "localhost".  9
> out of 10 time, most of the localhost ports are NOT blocked.
>
> Regards,
> T.A. Nguyen
> CN Consulting Inc.
> 2821 Brentwood Rd, Raleigh, NC 27604
> Tel: 919-427-9540
> Fax: 818-827-1728
> http://www.linkedin.com/in/nguyenta
>
>
>   
>> The simple method that Richard describe, I used that everyday.  Same with
>> most TCP/IP port connectivity.  If you can get there, there is a
>> connection.  I would do the telnet check first, it that not working then
>> check your FIREWALL (local and gateway machines) settings to make sure
>> that port isn't being blocked in anyway.  Temporary disabling your
>> personal firewall to test is also another way.
>>
>> good luck,
>> T.A. Nguyen
>> http://www.LinkedIn.com/in/nguyenta
>>
>>
>>     
>>> I found this:
>>>
>>> http://blog.godaddyhosting.com/2007/03/07/mysql-41-and-50-for-shared-hosting.aspx#comment-321235
>>>
>>> It says that, as of a bit over a year ago GoDaddy blocks the port.
>>>
>>> BigLee
>>>
>>>
>>> --- On Fri, 7/25/08, Richard O. Hammer <[email protected]> wrote:
>>>
>>>       
>>>> From: Richard O. Hammer <[email protected]>
>>>> Subject: Re: [Juglist] Troubleshooting a JDBC connection
>>>> To: "Java Users Group" <[email protected]>
>>>> Date: Friday, July 25, 2008, 5:28 AM
>>>> I have used telnet as a troubleshooting tool in cases where
>>>> I knew the
>>>> protocol.  For instance in a DOS command prompt window I
>>>> type:
>>>> C:\>  telnet earthlink.net 25
>>>> And then I can interact with Earthlink's SMTP server,
>>>> which answers on
>>>> port 25, by typing SMTP commands.  It is possible to send
>>>> email messages
>>>> this way if you know the SMTP.
>>>>
>>>> Unfortunately I don't know any JDBC.  But I just tried
>>>>
>>>> C:\>telnet secureserver.net 3306
>>>>
>>>> and in response got
>>>>
>>>> Connecting To secureserver.net...Could not open connection
>>>> to the host,
>>>> on port 3306: Connect failed
>>>>
>>>> Perhaps that port has no server answering, at least not
>>>> connections from
>>>> my IP address.
>>>>
>>>>
>>>> Rich Hammer
>>>>
>>>>
>>>> Robert J. Cameron wrote:
>>>>         
>>>>> On a personal project, I am using a MySQL database
>>>>>           
>>>> hosted by GoDaddy. I would really like to manipulate the
>>>> database from my dev machine. I have tried the Eclipse
>>>> plugins Quantum and EclipseSQL with no luck. Both appear to
>>>> be timing out.
>>>>         
>>>>> I have seen some speculation online that GoDaddy does
>>>>>           
>>>> not allow remote access to hosted databases, but no one I
>>>> can find has said this definitively. (Wouldn't that
>>>> manifest itself as "Connection Refused", not
>>>> "Connection Timed Out"?) What I know for sure is
>>>> that I'll get no help from them. They only support
>>>> their online admin tool, which is OK, but I'd really
>>>> like to do it all from Eclipse.
>>>>         
>>>>> My connection string looks like this:
>>>>>
>>>>> jdbc:mysql://p41mysql57.secureserver.net:3306/dbname
>>>>>
>>>>> I've also tried:
>>>>>
>>>>>
>>>>>           
>>>> jdbc:mysql://user:pass-0VCB3zs9OV+crqEuOn8uL5TO9Ttj0Xgd0e7PPNI6Mm0@public.gmane.org:3306/dbname
>>>>         
>>>>> I've also tried not specifying the port number,
>>>>>           
>>>> since it's not clear what port they are using.
>>>>         
>>>>> I feel like there's a lot of "stuff"
>>>>>           
>>>> between me and connecting to the database. I'd like to
>>>> remove as many variables as possible and concentrate on the
>>>> connection. Is there some sort of simple command-line
>>>> utility that will let me play with the connection string
>>>> and just let me see if I can connect? Anyone have any other
>>>> troubleshooting ideas?
>>>>
>>>>
>>>> _______________________________________________
>>>> Juglist mailing list
>>>> [email protected]
>>>> http://trijug.org/mailman/listinfo/juglist_trijug.org
>>>>         
>
>
> _______________________________________________
> Juglist mailing list
> [email protected]
> http://trijug.org/mailman/listinfo/juglist_trijug.org
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.