aspose file tools*
The moose likes JDBC and the fly likes mysql connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql connection problem" Watch "mysql connection problem" New topic
Author

mysql connection problem

Mark Sulej
Greenhorn

Joined: Jan 12, 2010
Posts: 2
hello
i have this code:

it work only for localhost. when url is for e.
it doesnt work. error is


and the best part is the last program run without problem
what's going on? thanks for help
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

Can you try to make a connection to the remote server with MySQL Workbench?


OCUP UML fundamental and ITIL foundation
youtube channel
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

"ma re", please see your private messages for an important administrative matter.


JBoss In Action
Mark Sulej
Greenhorn

Joined: Jan 12, 2010
Posts: 2
I can not connect. What is an example mysql hosting to connect succeeded. Give me sample web page
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

You will probably have to talk to your dba and network person to get the right information to make a successful connection to the database.
The MySQL documentation tells what you have to provide as parameters (and you have already checked that), but the real values will have to be provided to you by your team.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

Ah, now I see. You are going to a hosting company. I bet they just don't allow you to connect to that database from outside their data centre.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: mysql connection problem