• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB connection issue

 
Chris Fetterley
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to connect to a database using this code it just doesn't seem to be connecting....if anyone has an idea as to why it wouldn't be I would really appreciate some feed back.

Edited to add UBB Code Tags - Gregg Bolinger
[ September 26, 2003: Message edited by: Gregg Bolinger ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the following line:
protected final static String db_url = "jdbc:mysql://www.location.com/subfolder";
Typically, where you have specified subfolder, that should the name of the Database you are trying to connect to. Also, most admins won't allow access to a Database via a URL (www.location.com). I noticed also that you were using an obscure MySQL port which is typically 3306. So I would need some more information from you.
First and foremost, I need error messages. What Exceptions do you get when you try and connect.
Second, if you could explain why you are using a non-standard port and host address, that would be great.
 
Chris Fetterley
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok to have this make a bit more sense the url is changed along with user name and password and the ports that I used are changed as well. (they all worked before with a seperate program)
The problem is that I'm not getting any error messages, I compiled this as an .exe file and it runs...creates the file (no data in the file) or it runs for ever and then doesn't do anything. I was wondering if this might be somewhere within the logic of my database connection?
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic