Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Mysql connection through netbeans problem

807600Nov 18 2007 — edited Nov 18 2007
Hi All - I am trying to connect to a mysql database using the following:
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/database?" +
                    "user=user&password=pass");
But am getting an error of: SQLException: No suitable driver found for jdbc:mysql://local...

I have downloaded MySQL Connector/J and have added it to the netbeans project libraries and still nothing works. Has anyone any idea what I am doing wrong? Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2007
Added on Nov 18 2007
2 comments
230 views