与主机本地主机的 TCP/IP 连接端口 1433 出现故障
2022-09-01 11:34:26
当我尝试通过jdbc将eclipse与sql服务器连接时,我反复收到这2个错误。任何人都可以帮我这个或解释为什么我得到这个?
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);