sql数据库链接
发布日期:2021-05-07 06:39:19 浏览次数:14 分类:精选文章

本文共 602 字,大约阅读时间需要 2 分钟。

以前一直用的是mysql连接数据库,在使用sql连接数据库的时候遇到了一些问题

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.

与主机localhost、端口1433的TCP/IP连接失败。错误:连接被拒绝:连接。请验证连接属性,并检查SQL Server实例是否正在主机上运行,是否在端口上接受TCP/IP连接,以及是否没有防火墙阻止到该端口的TCP连接。

 

百度了一下,找到了解决方法

第一步:计算机-管理

双击,确保Named PipesTCP/IP 协议为已启用状态

 

第二:选中TCP/IP右键–>属性–>IP地址,往下拉滚动条,查看IPALLTCP端口是否为1433,不是,则改为1433

 

 

第三:重新启动

 

然后就可以了

上一篇:4.2类
下一篇:JSP内置对象的小例子问题

发表评论

最新留言

关注你微信了!
[***.104.42.241]2025年03月24日 19时20分09秒