title: The TCP/IP connection to the host localhost, port 1433 has failed
body: <p>I'm getting this 2 errors repeatedly when I'm trying to connect eclipse with <strong>sql server</strong> through <strong>jdbc</strong>. Could anyone help me with this or explain why am I getting this?</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>Thank you.</p>
  
  <pre><code>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);
  </code></pre>