【问题标题】:Which jdbc driver do I need for netbeans 11 to work with mysql 8.0?netbeans 11 需要哪个 jdbc 驱动程序才能与 mysql 8.0 一起使用?
【发布时间】:2019-11-12 08:28:39
【问题描述】:

我正在尝试建立与 mysql 服务器到 netbeans 的连接,但遇到了 mysql 问题。 p.s.谁能给我一个 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】:

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

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

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-27
    • 2013-06-24
    • 2011-02-11
    • 1970-01-01
    • 2015-09-11
    • 1970-01-01
    • 1970-01-01
    • 2014-11-04
    相关资源
    最近更新 更多