# SSL/TLS certificate validation errors when connecting to databases

**Symptoms**

During installation or configuration, the extension cannot establish a database connection.\
Error messages may mention SSL/TLS, certificate trust, or “the certificate chain was issued by an authority that is not trusted.”

* Error message example:

  ```
  SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: 
  The certificate chain was issued by an authority that is not trusted.
  ```

**Cause**\
The database requires SSL encryption, but the certificate presented cannot be validated. This often occurs when:

* A self-signed certificate is being used, and its authority certificate is not trusted on the machine running the extension.
* The full certificate chain (including intermediate certificates) is not installed.
* The client is enforcing encryption, but cannot verify the server’s certificate.

**Solution**

* If possible, use a certificate signed by a trusted Certificate Authority (CA).
* If using a self-signed certificate, import the authority certificate into the **Trusted Root Certification Authorities** store of the machine running the extension.
* Ensure the full certificate chain (including intermediates) is installed.
* If issues persist during installation, you can try resetting the setup:
  * Stop the extension service.
  * Delete the `runtime` and `config` folders to reset the installation.
  * Restart the installation and re-enter database details.
  * As a last resort, tick **Disable SSL certificate validation** to bypass the validation check.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infotopics.com/writebackextreme/troubleshooting-and-faq/application-startup/ssl-tls-certificate-validation-errors-when-connecting-to-databases.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
