Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql connection problem

 
Mark Sulej
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try to make a connection to the remote server with MySQL Workbench?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ma re", please see your private messages for an important administrative matter.
 
Mark Sulej
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can not connect. What is an example mysql hosting to connect succeeded. Give me sample web page
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic