-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use "/" in the name of DB. What should I do? #1193
Comments
As for the database name you have to remove the extra slash - |
@oshiro3 And a database name which contains slash |
This issue could be closed safely. |
@zihengCat @evergreen-trading-systems |
@oshiro3
There is no official DSN specification, Go team leave driver implementers define their own DSN format, which is much suitable and flexible for driver implementing. |
To see what ParseDSN expects, the best is to fill a Here is a template: https://go.dev/play/p/8E3WFHsTTJc |
This has been fixed by #1432. |
Issue description
I want to use "/" in the DSN for the database name, such as
xxx/yyy
, but I get the errorinvalid DSN: did you forget to escape a param value?
.Using
url.Escape ()
will evaluate the database name asxxx%2Fyyy
.How should I solve it?
I use go-sql-driver through golang-migrate/migrate library.
Example code
Error log
Configuration
Driver version (or git SHA):
v1.5.0
Go version: run
go version
in your consolego1.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
The text was updated successfully, but these errors were encountered: