JDBC URL format
This topic provides the JDBC (Java Database Connectivity) URL format for each database type. The JDBC URL specifies how to connect to a database using the JDBC API. The JDBC URL is specific to the database system you are connecting to and it varies depending on the database vendor and the configuration of your database instance.
Database type | JDBC URL |
---|---|
MySQL | jdbc:mysql://<DB-HOST>:<DB-PORT>/<DB-Name>?sslMode=VERIFY_CA&trustCertificateKeyStoreUrl=file://<PATH_TO_TRUSTSTORE_FILE>&trustCertificateKeyStoreType=jks&trustCertificateKeyStorePassword=<TRUSTSTORE_PASSWORD>&enabledTLSProtocols=TLSv1.2 |
Oracle TCPS | jdbc:oracle:thin:@tcps://<DB-HOST>:<DB-PORT>:<SERVICE_NAME>?javax.net.ssl.trustStore=<PATH_TO_TRUSTSTORE_FILE>&javax.net.ssl.trustStorePassword=<TRUSTSTORE_PASSWORD>&oracle.net.ssl_server_dn_match=false |
PostgreSQL |
If you are using a truststore for the root certificates, then the format of the JDBC URL must be: jdbc:postgresql://<DB-HOST>:<DB-PORT>/<DB-NAME>?sslMode=VERIFY_CA&trustCertificateKeyStoreUrl=file://<PATH_TO_TRUSTSTORE_FILE>&trustCertificateKeyStoreType=jks&trustCertificateKeyStorePassword=<TRUSTSTORE_PASSWORD> If you are not using a truststore for the root certificates, then the format of the JDBC URL must be: jdbc:postgresql://<DB-HOST>:<DB-PORT>/<DB-NAME>?ssl=true&sslmode=verify-ca&sslrootcert=<PATH_TO_ROOT_CERTIFICATE> |
MariaDB | jdbc:mysql://<DB-HOST>:<DB-PORT>/<CM-DB>?sslMode=VERIFY_CA&trustCertificateKeyStoreUrl=file://<PATH_TO_TRUSTSTORE_FILE>&trustCertificateKeyStoreType=jks&trustCertificateKeyStorePassword=<TRUSTSTORE_PASSWORD>&enabledTLSProtocols=TLSv1.2 |