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
Matt,
Can you please post the _full_ stack trace of the exception?
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html