-1

I'm trying to set up a connection to mysql server to netbeans but are having issues with mysql. p.s. Can someone give me a download link for the .jarfile for the jdbc driver?

I tried installing several drivers but to no avail. I recently unistalled mysql because the server was failing to initiliase in workbench too.

public class conn 
{
     Connection c;
     Statement s;
     public conn()
     {
         try
         {
             Class.forName("com.mysql.jdbc.Driver");
             c =DriverManager.getConnection("jdbc:mysql://localhost:3306
             //miniproject");     
             s =c.createStatement();
         } 
         catch(Exception e)
         {
             System.out.println(e);
         }
     }
}

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

1 Answers1

0

the download link for the jarfile for the jdbc driver is :

     https://dev.mysql.com/downloads/connector/j/

choose : Platform independent then download the latest Connector/j jar file

or click archive to download earlier version. the link for archives is : https://downloads.mysql.com/archives/c-j/

Ammar Z
  • 1
  • 1