繁体   English   中英

在Linux上无法通过JDBC连接到SQL Server

[英]Unable to connect to SQL Server via JDBC on Linux

我可以通过Windows计算机上的以下JDBC连接连接到我的SQL Server实例:

jdbc:sqlserver://<my_server>;databaseName=<my_db>;integratedSecurity=true;authenticationScheme=JavaKerberos;username=<my_user>;password=<my_pwd>

但是,在Linux机器上调用相同的连接字符串时,出现以下错误堆栈:

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host <my_server>, port 1433 has failed. Error: "Connection timed out: no further information.. 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.".

根据该论坛 ,我尝试过更改JDBC字符串以删除integratedSecurity=true ,但是遇到了相同的错误消息。

错误消息与身份验证或联网有关吗? 我能够通过SSH进入Linux计算机并成功ping <my_server>

我首先尝试是否可以从您的Linux客户端通过标准端口访问“ my_server”,例如

    telnet my_server 1433 

由于MS Sql Server在端口1433上侦听,MySQL在3306上侦听。如果可以,请使用上述的基本URL作为duffymo。 可能添加用户名和密码:
JDBC:SQLSERVER:// MYSERVER:1433;的databaseName = MY_DB;用户= my_user;密码= MY_PASSWORD

暂无
暂无

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

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