Unified Storage: Configure client to use tls=preferred (#91162)

* optionally set tls=preferred in the mysql connection string from env var
This commit is contained in:
owensmallwood 2024-07-30 11:24:28 -06:00 committed by GitHub
parent 9ad9b4989b
commit 2362e79e4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,6 +24,10 @@ func getEngineMySQL(getter *sectionGetter, _ trace.Tracer) (*xorm.Engine, error)
// See: https://dev.mysql.com/doc/refman/en/sql-mode.html
"@@SESSION.sql_mode": "ANSI",
}
tls := getter.String("db_tls")
if tls != "" {
config.Params["tls"] = tls
}
config.Collation = "utf8mb4_unicode_ci"
config.Loc = time.UTC
config.AllowNativePasswords = true