Skip to content

database/sql: mysql TLS support for Open #5737

Closed
@lukescott

Description

@lukescott
I need to open a TLS connection with a MySQL database using a client certificate.
Unfortunately there doesn't seem to be a clean way to specify this. The only thing we
can think of is specifying a filename in the custom "dataSourceName" string
format. But this gets rather complicated when you want to customize things like the
RootCA. If you want to provide an embedded certificate, you really can't.

We really need something like this:

OpenMore(driverName string, settings map[string]interface{}) (*DB, error)

So you could do something like this:

OpenMore("mysql", Settings{..., "tls": &tls.Config{...}}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions