How to Fix:Error: Microsoft ODBC Driver 18 for SQL Server : SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate].

Dipanjan Das 0 Reputation points

I followed the documentation: to run sql server on my uḃuntu vm 22.04 All the packages and dependencies are installed my mssql-server is also running but when i want to connect with my server after entering the password am getting the error.

Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SSL Provider: [error:0A000086:SSL routines::certificate verify failed:self-signed certificate]. Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Client unable to establish connection. For solutions related to encryption errors, see

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,320 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 25,837 Reputation points Microsoft Employee

    Hi, @Dipanjan Das Welcome to Microsoft Q&A thanks for posting your question.

    You can either install a certificate on your server, follow the document here ( or disable encryption with -No option (



    0 comments No comments

  2. CosmogHong-MSFT 20,901 Reputation points Microsoft Vendor

    Hi @Dipanjan Das

    Try adding TrustServerCertificate=yes; to your connection string.

    Best regards,

    Cosmog Hong

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments