title: Rider with SQL Server - The driver could not establish a secure connection to SQL Server by using SSL encryption
body: <p>I installed SQL2019 and SQL Server Management Studio.
  SQL Server with name &quot;TESTINSTANCE&quot; is running.</p>
  <p>When I press &quot;Test Connection&quot; then I get this error:</p>
  <blockquote>
  <p>[08S01] The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: &quot;PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&quot;. ClientConnectionId:9d6e6b90-bd20-4364-b0e4-bfbdd6bc57c8 unable to find valid certification path to requested target.</p>
  </blockquote>
  <p>It seems like my solution would be tab SSH/SSL -&gt; Use SSL, but I don't know where should I get certificate files. Maybe it's something else, I don't know.</p>
  <p><strong>UPDATE</strong>:</p>
  <p>All my first attempts was without &quot;Use SSL&quot;, it doesn't work either.</p>
  <p>Jdbc driver is installed by Rider by default.</p>
  <p>Server=LEKRET\TESTINSTANCE don't work (Incorrect driver and/or database URL specified).</p>
  <p><strong>UPDATE 2</strong>:</p>
  <p>Well, I finally found where I can enable Trust Server Certificate, in Advanced Options. Not ideal, but everything is on local machine so it should be fine.</p>
  <p>Password and login didn't work, but I finally managed to create login with windows auth in SSMS.</p>
  <p>After 8 hours it's finally working.</p>
  <p><a href="https://i.stack.imgur.com/AXw4J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AXw4J.png" alt="enter image description here" /></a></p>