Home  >  Q&A  >  body text

java连接本机的sqlserver2008出现错误

telnet 127.0.0.1 1433连接不上
telnet localhost 1433 能连上

com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 连接到主机 localhost 的 TCP/IP 连接失败。错误:“Connection refused: connect。请验证连接属性。确保 SQL Server 的实例正在主机上运行,且在此端口接受 TCP/IP 连接,还要确保防火墙没有阻止到此端口的 TCP 连接。”。

高洛峰高洛峰2717 days ago666

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-04-18 10:32:45

    Use the built-in client to connect and see

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:32:45

    You first connect to your own sqlserver to see if it works, whether the IP is correct, and whether it is on a local area network! ! !

    reply
    0
  • Cancelreply