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...