fix mysql client certificate support (#3575)

This commit is contained in:
blotus 2025-04-16 14:39:26 +02:00 committed by GitHub
parent 7e280b23af
commit 4004868245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 8 deletions

View file

@ -82,7 +82,11 @@ func NewClient(ctx context.Context, config *csconfig.DatabaseCfg) (*Client, erro
}
}
drv, err := getEntDriver(typ, dia, config.ConnectionString(), config)
dbConnectionString, err := config.ConnectionString()
if err != nil {
return nil, fmt.Errorf("failed to generate DB connection string: %w", err)
}
drv, err := getEntDriver(typ, dia, dbConnectionString, config)
if err != nil {
return nil, fmt.Errorf("failed opening connection to %s: %w", config.Type, err)
}