Re: ConnectionException: null (in com.mysql.jdbc.Connection)
Posted by: Mark Matthews
Date: March 06, 2005 04:38PM

abyssnolf wrote:
> Pretty new to mySQL, so I've been trying to run my
> first java program that connects to the database,
> and this error occurs everytime I try to connect.
> I'm using the Connector/j 3.1.7 and the newest
> version of MySQL. The problem occurs in the last
> of the following lines of code:
> String url= "";
> try {
> url = "jdbc:mysql://" + host + "/" +
> database + "?user=Scooby&password=****";
> Connection con =
> DriverManager.getConnection(url);
> And I'm not sure where to go from there. I do
> check the driver with Class.forName... and it
> seems to work out. One thing I can't seem to do
> is connect to mySQL from the command line (windows
> xp pro) by simply typing "mysql" or "mysql -p". I
> just get an error 2003. Any help is appreciated.
> Matt


Can you please post the _full_ stack trace of the exception?


Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools

Options: ReplyQuote

Written By
Re: ConnectionException: null (in com.mysql.jdbc.Connection)
March 06, 2005 04:38PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.