mysql数据库无法连接(JDBC)java.net.ConnectException: Connection timed out
|
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: java.net.ConnectException: Connection timed out: connect
STACKTRACE:
java.net.SocketException: java.net.ConnectException: Connection timed out: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.fei.keyword.util.JDBCUtil.<init>(JDBCUtil.java:36)
at com.fei.keyword.util.JDBCUtil.main(JDBCUtil.java:15)
** END NESTED EXCEPTION **
Last packet sent to the server was 684 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2707)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.fei.keyword.util.JDBCUtil.<init>(JDBCUtil.java:36)
at com.fei.keyword.util.JDBCUtil.main(JDBCUtil.java:15)
|
mysql数据库无法连接(JDBC)java.net.ConnectException: Connection timed out的更多相关文章
- javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection timed out: connect
本地测试向服务器中ActiveMQ添加队列数据,报错连接超时 解决: 查看服务器端口号是否存在,(最好是0.0.0.0格式的,虽然暂时还不知道为啥得这个格式) 通过telnet测试该端口不通(6161 ...
- Caused by: java.net.ConnectException: Connection timed out: connect
发生这种情况的原因是:连接的路径发生错误
- java.net.ConnectException: Connection timed out
原因可能如下: (1)生成的WSDL的IP地址是不是服务器的IP: (2)代码中是否需要代理,若否,取消代理,若是,设置代理:
- java.net.ConnectException: Connection timed out: no further information
ping IP 地址 检查是否连上 重启虚拟机 检查主机
- Caused by: java.net.ConnectException: Connection refused/Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
1.使用sqoop技术将mysql的数据导入到Hive出现的错误如下所示: 第一次使用命令如下所示: [hadoop@slaver1 sqoop--cdh5.3.6]$ bin/sqoop impor ...
- com.microsoft.sqlserver.jdbc.SQLServerException: 到主机 的 TCP/IP 连接失败。 java.net.ConnectException: Connection refused: connect
问题描述:最简单的数据库连接报错,到主机 的 TCP/IP 连接失败.(win 7 操作系统) 错误信息: com.microsoft.sqlserver.jdbc.SQLServerExcep ...
- Java对MySQL数据库进行连接、查询和修改(转)
Java对MySQL数据库进行连接.查询和修改 0. 一般过程: (1) 调用Class.forName()方法加载驱动程序. (2) 调用DriverManager对象的getConnection( ...
- java与MySQL数据库的连接
java与MySQL数据库的连接 1.数据库的安装和建立参见上一篇博客中的第1,2步骤.(http://blog.csdn.net/nuptboyzhb/article/details/8043091 ...
- MySQL数据库远程连接
12.00 MySQL数据库远程连接 参考: http://www.jb51.net/article/24508.htm http://www.linuxdiyf.com/viewarticle.ph ...
随机推荐
- MongoDB 聚合结果大小限制
The aggregate command can return either a cursor or store the results in a collection. When returnin ...
- ArcEngine之Provide your license server administrator with the following information.error code =-42
今天打开VS,不一会就出现了下面的对话框,感到非常疑惑,仔细一想,原来是昨天不小心把权限弄错了! 解决办法:在控价中找到AxLicenseControl,右键属性,把权限改为ArcGIS Engine ...
- wordcount(C语言)
写在前面 上传的作业代码与测试代码放在GitHub上了 https://github.com/IHHHH/gitforwork 本次作业用的是C语言来完成,因为个人能力与时间关系,只完成了基本功能,扩 ...
- 007-aven-assembly-plugin和maven-jar-plugin打包,java启动命令
一.需求 打一个zip包,包含如下: bin为程序脚本,启动和停止 lib为依赖包 根目录下为配置文件和项目jar包 二.知识储备 2.1.插件了解 plugin function maven-jar ...
- kettle添加hadoop cluster时报错Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: hadoop:password@node56:9000
完整报错是: Caused by: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: ...
- HDU2425:Hiking Trip(简单bfs,优先队列实现)
题目: 传送门 题意很简单就不解释了,水题一道. #include <iostream> #include <string.h> #include <stdio.h> ...
- SDUT3141:Count(哈希)好题
题目:传送门 题目描述 You are given an integer array s[] and are asked to count how many positions a, b, c and ...
- Hibernate错误:Could not bind factory to JNDI
使用hibernate时,将hibernate.cfg.xml中 <session-factory name="SessionFactory">的那么属性去掉即可.因为 ...
- python select poll
http://www.cnblogs.com/coser/archive/2012/01/06/2315216.html
- selenium 代理 Cookies 截图 等待 调用JS
改变用户代理 读取Cookies 调用Java Script Webdriver截图 页面等待 1. 改变用户代理 import org.junit.AfterClass; import org.ju ...