This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 2497
    
    8

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: 5823
    
    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: 2497
    
    8

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: 2497
    
    8

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.
 
 
subject: mysql connection problem