Skip to content

I want to use "/" in the name of DB. What should I do? #1193

Closed
@oshiro3

Description

@oshiro3

Issue description

I want to use "/" in the DSN for the database name, such as xxx/yyy, but I get the error invalid DSN: did you forget to escape a param value? .
Using url.Escape () will evaluate the database name as xxx%2Fyyy.
How should I solve it?

I use go-sql-driver through golang-migrate/migrate library.

Example code

sql.Open("mysql", "user@tcp(host:port)/xxxx/yyy")

Error log

invalid DSN: did you forget to escape a param value?

Configuration

Driver version (or git SHA):

v1.5.0

Go version: run go version in your console

go1.15.3

Server version: E.g. MySQL 5.6, MariaDB 10.0.20

MySQL 5.7

Server OS: E.g. Debian 8.1 (Jessie), Windows 10

MacOS Catalina

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