Skip to content

Support MySQL official URI connection format (mysql://...) #1736

@NamanMahor

Description

@NamanMahor

Currently, the Go MySQL driver only supports the following DSN format:

user:password@tcp(localhost:3306)/dbname?param1=value1.

However, MySQL’s official documentation

defines a URI-based connection string format that looks like this:

mysql://user:password@localhost:3306/dbname?param1=value1

It would be useful if the driver could support the official URI scheme in addition to the current DSN format, for consistency with MySQL clients and other language drivers.

This would allow Go applications to accept and use standard MySQL connection URIs (e.g. from environment variables or config files) without having to reformat them.

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