专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Eclipse

127.0.0.1, port 1433 has failed. Error: Connection refused:

发布时间:2010-06-05 15:35:24 文章来源:www.iduyao.cn 采编人员:星星草
java连sqlserver2005数据库的问题


有这样的错误,连不上数据库,不知道为啥,该怎么解决?
fail to load JDBC/ODBC driver
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host 127.0.0.1, 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.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:130)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1195)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(SQLServerConnection.java:1054)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:758)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at OperateData.init(OperateData.java:25)
at OperateData.<init>(OperateData.java:38)
at test.main(test.java:21)


------解决方案--------------------
你的连的本地数据库吗?拒绝访问了
------解决方案--------------------
服务起了吗?
------解决方案--------------------
“ Connection refused”拒绝了。数据库服务开没?你连的是不是本机数据库?
------解决方案--------------------
这个问题可能是端口号的问题,你看看你设置的端口号是不是1433,还有连接数据库时写的端口号是不是1433,我以前也遇过这种错,就是端口号的问题。
希望对你有所帮助!
------解决方案--------------------
端口号 查看一下
------解决方案--------------------
端口、网络、防火墙,都看看吧
------解决方案--------------------
你先用你的用户登陆一下SQL Server Manager 看能不能登录成功。
应该是你的登录的用户有点问题。
我的异常网推荐解决方案:Listener refused the connection with the following error:,http://www.myexceptions.net/j2ee/345213.html
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: