If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > getConnection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-04, 16:32
keeganwade keeganwade is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
getConnection

I'm trying to build the most basic db app known to man. I installed a driver properly, and accessed it without an exceptions being thrown, like so:


Class.forName( "org.gjt.mm.mysql.Driver").newInstance();


I, however, get no love trying to run the following:


Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/mydatabase", "", "");


I get the following error:

java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused

** BEGIN NESTED EXCEPTION **

java.net.ConnectException
MESSAGE: Connection refused

STACKTRACE:

java.net.ConnectException: Connection refused
blah blah blah...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On