当前位置: 代码迷 >> Eclipse >> 在使用SQL server 连接JAVA时。报出这样的错。求解解决方案
  详细解决方案

在使用SQL server 连接JAVA时。报出这样的错。求解解决方案

热度:40   发布时间:2016-04-23 13:41:17.0
在使用SQL server 连接JAVA时。报出这样的错。。。求解
The TCP/IP connection to the host localhost, port 1433 has failed. Error: Connection refused: connect. Please verify the connection properties and check that a SQL Server instance is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.

------解决方案--------------------
连接代码应该是有问题,特别是你的连接串
------解决方案--------------------
去数据库看看你的SQLServer 端口号是不是默认端口1433 打开TCP/IP协议
------解决方案--------------------
sqlserver有个tcp/ip服务没开
------解决方案--------------------
检查下你的端口号吧,看是不是1433.TCP/IP要开启,然后重启电脑再试一次吧
  相关解决方案