Hi folks,
I ran into the same issue as ms5310 — namely, Metabase couldn’t connect to the metadata database because our database provider only supports connections over SSL.
After digging into the Metabase code, I found that there is another environment variable that gets parsed and used before trying the MB_DB_* variables outlined here: https://metabase.com/docs/latest/operations-guide/start.html#configuring-the-metabase-application-database.
This variable is called MB_DB_CONNECTION_URI, which overrides the other variables, and allows you to specify a raw JDBC connection URI. Passing ssl=true as a query string parameter in MB_DB_CONNECTION_URI works as expected and forces the connection to be established over SSL.