我反复得到这2个错误,当我试图用日食SQL 服务器通过JDBC连接。任何人都可以帮我解决这个问题,或解释我为什么得到这个?的TCP/IP连接到主机本地主机,端口1433失败
1. The TCP/IP connection to the host localhost, port 1433 has failed.
2. The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.
谢谢。
String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
Class.forName(driver).newInstance();
String connString ="jdbc:sqlserver://localhost:1433/databaseName=Engg_Street;instance=SQLSERVER;encrypt=true; trustServerCertificate=true";
String username = "Vijayalakshmi";
String password = "";
conn = DriverManager.getConnection(connString,username,password);
错误很明显:JDBC无法使用SSL连接到您的数据库您的数据库是否配置为在端口1433上使用SSL? – Stefan
您正在使用的任何代码?帮助我们提供帮助 – qiGuar
嘿,我已经在我的新问题中发布了代码,你能帮忙吗? –