Skip to content

tls option in DSN not existing #1479

@vjtvalero

Description

@vjtvalero

Just a question if not an issue. But I had to append "&tls=true" to the DSN in order to enable secure connection.
Is this an acceptable way?

db, err := sql.Open("mysql", cfg.FormatDSN() + "&tls=true")
if err != nil {
    log.Fatal(err)
}

I cannot do it like:

cfg.TLS = tlsConfig
cfg.InterpolateParams = true
cfg.tls = true // no property of this name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions