尝试使用 Hibernate 将 Tomcat 上的 Java Spring 应用程序连接到我的 sqlserver Express 数据库。
出现错误:
com.microsoft.sqlserver.jdbc.SQLServerException: Connection Failed TCP / IP to localhost port 1433.
Error: "Connection refused: connect. Check the connection properties, make
sure that an instance of SQL Server is running on the host and accepting TCP
/ IP connections to port, and make sure that no firewall is blocking TCP
connections to port. ".
最佳答案
问题是您的 tcp/ip 协议(protocol)不是 1433,请按照以下说明操作,您的问题应该会消失: SqlServer 配置管理器 > Sql 服务器网络配置 > SQLEXPRESS 协议(protocol) > 右键单击 TCP/IP > 属性 > IP 地址 > IPALL 并将 TCP 端口更改为 1433
关于Java Hibernate sql server Express 连接错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35287797/