com.mysql.jdbc.exceptions.jdbc4.mysqlnontransientconnectionexception:couldnotcreateconnectionto(代码片段

manor的大数据奋斗之路 manor的大数据奋斗之路     2022-12-26     554

关键词:

折腾了好久,后来发现是版本问题,驱动和数据库不匹配导致。

原来用的是5.1.37的驱动。数据库是mysql5.7,可以连接成功。

就在我把数据库换成了8.0之后,所有的买点啥都报标题里的错误了。

换成了下边这个驱动就OK了。

解决方法:

在pom.xml里面重新添加

<groupId>mysql</groupId> 
<artifactId>mysql-connector-java</artifactId> 
<version>8.0.13</version>

然后右键pom.xml文件Maven中Reimport就可以重新下载

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接[重复]

】com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接[重复]【英文标题】:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communicationslink[duplicate]【发布时间】:2012-09-1714:25:41【问题描述】:我使用的是MacOSXLion10.8版。我通过XAMPP安... 查看详情

错误 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

】错误com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException【英文标题】:Errorcom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException【发布时间】:2013-11-2014:33:47【问题描述】:我有一个使用休眠的Spring应用程序。我正在尝试将用户对象插入数据... 查看详情

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException 2s 后

】com.mysql.jdbc.exceptions.jdbc4.CommunicationsException2s后【英文标题】:com.mysql.jdbc.exceptions.jdbc4.CommunicationsExceptionafter2s【发布时间】:2021-08-0611:45:10【问题描述】:我正在使用drop-wizard和mysql5.6。每当查询花费超过2秒时,我都会不断收... 查看详情

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

】com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障【英文标题】:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communicationslinkfailure【发布时间】:2010-06-0605:49:10【问题描述】:我正在努力让我的数据库与我的Java程序对话... 查看详情

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障

】com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链路故障【英文标题】:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communicationslinkfailure【发布时间】:2010-06-0605:49:10【问题描述】:我正在努力让我的数据库与我的Java程序对话... 查看详情

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException 的未知列 [重复]

】com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException的未知列[重复]【英文标题】:Unknowncolumnforcom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException[duplicate]【发布时间】:2016-09-0821:44:32【问题描述】:我正在尝试在SpringJPAMVC环境中连接到MySql... 查看详情

获取 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SQL 语法

】获取com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:SQL语法【英文标题】:Gettingcom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:SQLsyntax【发布时间】:2012-12-2206:23:57【问题描述】:doStringmid=res.getString(1);Stringmodel= 查看详情

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException 在休眠程序中要求检查 mysql 版本

】com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException在休眠程序中要求检查mysql版本【英文标题】:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExceptioninhibernateprogramwhichaskforcheckmysqlversion【发布时间】:2017-04-2909:26:43【问题描述】:在基于 查看详情

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException 使用 PreparedStatement 时

】com.mysql.jdbc.exceptions.MySQLSyntaxErrorException使用PreparedStatement时【英文标题】:com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptionwhenusingPreparedStatement【发布时间】:2015-10-1620:54:02【问题描述】:我正在尝试执行一个查询,该查询返回一个学... 查看详情

使用 JDBC 访问远程 MySQL 数据库时出现 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

】使用JDBC访问远程MySQL数据库时出现com.mysql.jdbc.exceptions.jdbc4.CommunicationsException【英文标题】:com.mysql.jdbc.exceptions.jdbc4.CommunicationsExceptionwhenusingJDBCtoaccessremoteMySQLdatabase【发布时间】:2010-12-3112:13:28【问题描述】:/****/pac 查看详情

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:不允许检索公钥

】com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:不允许检索公钥【英文标题】:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:PublicKeyRetrievalisnotallowed【发布时间】:2019-07-0114:43:00【问题描述】:安装mys 查看详情

mysql异常:causedby:com.mysql.jdbc.exceptions.mysqltimeoutexception:statementcancelledduetotimeo

Causedby:com.mysql.jdbc.exceptions.MySQLTimeoutException:Statementcancelledduetotimeoutorclientrequest atcom.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2303) atcom.mysql.jdbc.ConnectionI 查看详情

Android:com.mysql.jdbc.exceptions.jdbc4.communicationsexception 通信链路故障

】Android:com.mysql.jdbc.exceptions.jdbc4.communicationsexception通信链路故障【英文标题】:Android:com.mysql.jdbc.exceptions.jdbc4.communicationsexceptioncommunicationslinkfailure【发布时间】:2013-01-0700:16:17【问题描述】:我有正确的IP:Port,所以我不知道... 查看详情

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:重复条目 '' 键 'PRIMARY'

】com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:重复条目\\\'\\\'键\\\'PRIMARY\\\'【英文标题】:com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:Duplicateentry\'\'forkey\'PRIMARY\ 查看详情

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

】com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException【英文标题】:【发布时间】:2012-04-2023:03:07【问题描述】:错误是::你有一个SQL语法错误;检查与您对应的手册MySQL服务器版本,用于在\'book_id=附近使用正确的语法第1行的“DSP123... 查看详情

cause:com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception:.....thisisincompatiblewithsq

一、异常信息org.springframework.jdbc.BadSqlGrammarException:###Errorqueryingdatabase.Cause:com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:Expression#2ofSELECTlistisnotinGROUPBYclauseandcontainsno 查看详情

cause:com.mysql.jdbc.exceptions.jdbc4.communicationsexception:thelastpacketsuccessfullyreceive

今天访问已经架上服务器的网站,报错:Cause:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Thelastpacketsuccessfullyreceivedfromtheserverwas78,050,512millisecondsago.Thelastpacketsentsuccessfullytotheserverwas78 查看详情

“com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接故障”到远程数据库

】“com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:通信链接故障”到远程数据库【英文标题】:"com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communicationslinkfailure"toremotedatabase【发布时间】:2014-03-2417:00:15【问题描述】:我 查看详情