Press "Enter" to skip to content

Fixing – Error: “PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Last updated on July 7, 2022

During my attempt to connect PyCharm to a SQL Server data source with Windows Authentication and ran into a slew of errors. Upon searching I noticed there was a dearth of resources on this issue.

Some posts mention messing with your certificate store but with a local sever I dont have the interest in configuring certificate based auth.

From experience I knew a security issue reported in SQL Auth generally is related to the certificates/encryption settings on the connection, often turning it off works fine (don’t do this in production.)

I found nothing useful in the SSL/TLS – clearly the standard “uncheck encryption” trick isn’t managed here.

 

 

Looking further I found the Driver: section, here the MSSQL driver settings I needed are available.

picking advanced/driver settings

 

 

 

Click the Advanced tab.clicking the advanced tab in the driver settings

 

 

 

 

Update integratedSecurity to true and encrypt to false. changing pycharm driver settings

 

 

This fixed my authentication issues with the local server.connected window

2 Comments

  1. Ditha Ditha

    Thank you! I’ve been searching hi and low for this response. I’m trying to establish connection between my local SQLEXPRESS and an application and keep getting this error. There is no Driver section on the application I’m using but I put “integratedSecurity=true; encrypt=false;” on the free text advanced config option and it worked! Thanks so much for this post.

    • ck ck

      🙂 Glad to hear it helped. I could tell as soon as I fixed this problem that most people using pycharm wouldn’t have also been SQL Server DBAs in the past.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.