List:MySQL and Java« Previous MessageNext Message »
From:Shankar Unni Date:February 11 2003 6:03pm
Subject:RE: No suitable driver error
View as plain text  
> Connection conn = DriverManager.getConnection("jdbc:mysql:TestDB");

That's not what a valid JDBC URL looks like for MySQL. The official spec
is:

 
jdbc:mysql://[hostname][:port]/dbname[?param1=value1][&param2=value2]...

The shortest form of this for you, if the client is on the same host as
the mysql server, is

  jdbc:mysql:///TestDB

It's better form to mention at least the hostname, though, to make this
explicit:

  jdbc:mysql://localhost/TestDB

Unfortunately the only documentation available for Connector/J is on the
sourceforge site for an old version of mm.mysql driver:

  http://mmmysql.sourceforge.net/doc/mm.doc/book1.htm.

Mark: the www.mysql.com site has *no* pointers to this documentation.
Any chance of getting an updated version of this documentation into the
mysql.com site?

Thread
Possible connection problem with Connector/Jjlafontaine@lyon-partdieu.sema.slb.com)7 Feb
  • No suitable driver errorSteve Gere10 Feb
    • RE: No suitable driver errorShankar Unni11 Feb
      • Re: No suitable driver errorMark Matthews11 Feb
      • RE: No suitable driver errorSteve Gere11 Feb