连接Netbeans和MySQL但出现Big Integer错误 [英] Connecting Netbeans and MySQL but getting Big Integer error

查看:122
本文介绍了连接Netbeans和MySQL但出现Big Integer错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我试图将新连接添加到我的Netbeans数据库(即MySQL)中,但是我遇到Big Integer转换错误,有人可以帮助我吗? 详细信息:

So I am trying to add new connection to my Netbeans' database which is MySQL but I am getting Big Integer casting error can someone please help me? In detail:

我右键单击位于本地主机上的现有 MySQL服务器:3306 [root(已断开连接) >>选择 connect ,然后弹出

I right click on existing MySQL Server at localhost:3306 [root(disconnected) >> select connect and this pops up

无法连接到MySQL服务器:

Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException:org.netbeans.api.db.explorer.DatabaseException:java.sql.SQLException:java.lang.ClassCastException:java.math.BigInteger无法转换为Java.朗朗.

org.netbeans.api.db.explorer.DatabaseException: org.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long.

服务器可能未运行,或者您的MySQL连接属性未正确设置.您要编辑MySQL连接属性吗?

The server may not be running or your MySQL connection properties may not be set correctly. Do you want to edit your MySQL connection properties?

我的基本和管理员属性都可以.

And my basic and admin properties are OK.

我也尝试过:右键单击数据库 >>选择新建连接 >>驱动程序: MySQL(Connector/J驱动程序) ,JDBC URL: jdbc:mysql://localhost:3306/mysql ,但是当我测试连接时,它也给我同样的错误.

And I tried this too: Right click on databases >> select New Connection >> Driver: MySQL(Connector/J driver), JDBC URL: jdbc:mysql://localhost:3306/mysql , but when I test the connection it gives me the same error.

** MySQL服务器正在运行.

**MySQL server is running.

谢谢.

推荐答案

这是JDBC驱动程序问题

我在netbeans中也遇到了类似的问题.我通过从数据库/驱动程序下的驱动程序列表中删除默认驱动程序(Connector/J驱动程序)来解决,如下所示.

I had a similar problem in netbeans. I resolved by removing the default driver (Connector/J driver) from the driver list under databases/drivers as shown below.

这发生在mysql v8.0上的jdbc v8.0.12

This happened with jdbc v8.0.12 on mysql v8.0

因此,在删除默认的jdbc驱动程序之后,我添加了旧版本的驱动程序mysql-connector-java-5.1.47. 连接成功.

So after removing the default jdbc driver, I add an old version of the driver mysql-connector-java-5.1.47. The connection the succeeded.

这篇关于连接Netbeans和MySQL但出现Big Integer错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆