x项目运行后控制台报错如下:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 14303 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 配置管理器---》找的SqlServer 2005网络配置---》双击tcp/ip--选择IP地址---》拉到底---》IPALL 中动态端口设置为1433 完美解决
本文介绍了解决SQL Server数据库连接失败的具体步骤。当尝试连接到SQL Server时如果遇到错误提示“Connection refused”,可以通过调整SqlServer配置管理器中的TCP/IP端口设置来解决此问题。
1281

被折叠的 条评论
为什么被折叠?



