Are those your real login details? If yes, please edit them out.
Regarding timeout, are you able to ping the given host from your machine (ping tribalwars.db.4489877.hostedresource.com)? Also, what happens when you comment out the DriverManager.setLoginTimeout(100) line? I don't see a port number mentioned in there; is the db in consideration running on default MySQL port?
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
> Is there a way to make it retry the connection
Automatic retries? Not that I'm aware of. Of course, it's dead simple to just loop over for a given number of times before giving up completely.
> I set the timeout to 500Secs and it still timesout in like 5-7 secs...
The timeout exception need not necessarily be of the client socket (in our case the socket used by the Driver). Server sockets can also have timeouts which might be the reason why you are getting time outs (which again is not surprising given timeouts in your ping). Are you able to connect to the database in consideration using some sort of SQL explorer like workbench ?
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
A pity I missed that; you just need to append the database name at the end of your URL. Example here .
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734