In the JDBC URL, useSSL=true
enables SSL encryption, and requireSSL=true
specifies that SSL is required. Setting verifyServerCertificate=false
is needed in some specific cases.
Adding trustServerCertificate=true
allows the driver to trust the server certificate and make an SSL connection.
Note: If your database server uses a custom certificate authority (CA), you need to include the CA certificate in the Databricks cluster's Java truststore to enable the driver to trust the certificate. You can use the spark.executor.extraJavaOptions
and/or spark.driver.extraJavaOptions
configuration options to add the CA certificate to the Java truststore.