Skip to content
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

Connect with password has "%" symbol #987

Closed
victormongi opened this issue Aug 9, 2019 · 4 comments
Closed

Connect with password has "%" symbol #987

victormongi opened this issue Aug 9, 2019 · 4 comments

Comments

@victormongi
Copy link

How to connect with password has "%" symbol?

@methane
Copy link
Member

methane commented Aug 9, 2019

Use the connector interface or change the password.

@methane methane closed this as completed Aug 9, 2019
@julienschmidt
Copy link
Member

What exactly is the problem with a password containing %?. There are some restrictions on the username, but there shouldn't be any on the password.

@victormongi
Copy link
Author

@methane do you have example?

@shogo82148
Copy link
Contributor

I can't find any problem with a password containing %.

@victormongi Please fill the issue template https://github.com/go-sql-driver/mysql/blob/master/.github/ISSUE_TEMPLATE.md

here is my example.


Issue description

All tests pass even if a password containing "%" symbol.

Example code

docker run -d -p 127.0.0.1:3307:3306 --name mysqld -e MYSQL_DATABASE=gotest -e MYSQL_USER=gotest -e MYSQL_PASSWORD=sec%ret -e MYSQL_ROOT_PASSWORD=verysecret mysql:5.7 --innodb_log_file_size=256MB --innodb_buffer_pool_size=512MB --max_allowed_packet=16MB --local-infile=1
export MYSQL_TEST_USER=gotest
export MYSQL_TEST_PASS=sec%ret
export MYSQL_TEST_ADDR=127.0.0.1:3307
go test -v ./..

Error log

(omit)
=== RUN   TestIsolationLevelMapping
--- PASS: TestIsolationLevelMapping (0.00s)
PASS
ok      github.com/go-sql-driver/mysql  40.855s

Configuration

Driver version (or git SHA): 877a977

Go version: go version go1.12.7 darwin/amd64

Server version: mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper

Server OS: Docker on macOS Mojave 10.14.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants