Re: Troubleshooting a JDBC connection
"Shawn Hartsock" <[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <[email protected]> |
Actually, a firewall can refuse connection or swallow the packets depending on the configuration. The choice to "black hole" the packets is actually quite common now-a-days. This helps prevent denial of service attacks. Before you start hacking around with JDBC you need to first establish that port 3306 is accepting traffic. I usually just use the mysql.com tool mysql which is a command line utility used for working with mysql either on your local machine or over a network. A typical mysql command to talk to a remote mysql machine would look like: $ mysql -u user -ppass -h p41mysql57.secureserver.net ... I think I'll leave that there. You can go read up on the mysql.com site if you want to head down that path. But I'll point out that usernames and passwords in mysql may be restricted so that they only work from certain host names. After we know that traffic can pass between the machines, the username and password will work on a remote connection from the IP address we are using we can now configure JDBC. Then we play around with our other tools. If no traffic moves between your machine and the remote machine on 3306 I'd say that it is far more than speculation that you can't talk to your server on port 3306 it is an established fact. Why is another matter. On Thu, Jul 24, 2008 at 9:46 PM, Robert J. Cameron <robertjcameron-/[email protected]> wrote: > Hi all, > > 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? > > Thanks, > Rob > > > > > _______________________________________________ > Juglist mailing list > [email protected] > http://trijug.org/mailman/listinfo/juglist_trijug.org > -- /** Shawn.Hartsock http://hartsock.blogspot.com/ //*/