我需要哪个jdbc驱动程序才能与mysql 8.0一起使用netbeans 11?

问题描述 投票:0回答:1

我正在尝试建立到mysql服务器到netbeans的连接,但是mysql出现问题。 ps。有人可以给我下载jdbc驱动程序.jar文件的下载链接吗?

我尝试安装多个驱动程序,但无济于事。我最近发布了mysql,因为服务器也无法在工作台中初始化。

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

netbeans driver
1个回答
0
投票

jdbc驱动程序的jarfile的下载链接是:

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

选择:与平台无关然后下载最新的Connector / j jar文件

或单击存档以下载早期版本。存档的链接是:https://downloads.mysql.com/archives/c-j/

© www.soinside.com 2019 - 2024. All rights reserved.