The TCP/IP connection to the host xxxx, port 1433 has failed

The TCP/IP connection to the host 1xxxx, port 1433 has failed. Error: “connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.”.

image.png

检查端口开放情况

Windows Server服务器里已经开通好了1433端口;但是本地telnet 1433 连接失败。这可能就是数据库本身的问题。在网上查找资料可以使用SQL Server 2019 配置管理器查看一些信息。

image.png

需要开启SQL Server 网络配置 ----MASSQL SERVER 的协议 ----TCP/IP;刚刚连接失败是因为没有启用这个TCP/IP协议。启用协议后,依然连接失败;这时候需要重新启动一下SQL Server数据库就好了。

image.png

image.png

连接成功

首先确定数据库端口1433可以telnet;然后在可视化工具中连接数据库,测试连接:远程连接成功

image.png