简体   繁体   English

Java Hibernate SQL Server表达连接错误

[英]Java Hibernate sql server express connection error

Trying to connect my Java Spring app on Tomcat to my sqlserver express database with Hibernate. 尝试使用Hibernate将Tomcat上的Java Spring应用程序连接到sqlserver express数据库。

Getting error: 出现错误:

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协议不是1433,请按照以下说明操作,您的问题应该消失了:SqlServer配置管理器> Sql服务器网络配置> SQLEXPRESS的协议>右键单击TCP / IP>属性> IP地址> IPALL并将TCP PORT更改为1433

in majority of cases its the firewall that blocks it. 在大多数情况下,它是阻止它的防火墙。 try disabling it 尝试禁用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM