-
Notifications
You must be signed in to change notification settings - Fork 1k
Can't connect to mysql server 8.0 when password is larger than 19 characters #911
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
Comments
Thank for reporting, I'll take a look next week |
@lance6716 |
@erfanium Thank you, currently I only tried to reproduce this problem, but I have not started to locate the root cause. This is my testing steps: docker run --rm --name mysql-3306 -p 3306:3306 -e MYSQL_ROOT_PASSWORD='*pl3$#&XiC4Tn*AP13l#OKUY' mysql:8.0.33 --log-bin=mysql-bin --port=3306 --bind-address=0.0.0.0 --binlog-format=ROW --server-id=1 --gtid_mode=ON --enforce-gtid-consistency=true --default-authentication-plugin=caching_sha2_password then add this unit test in func TestComplexPassword(t *testing.T) {
conn, err := Connect("127.0.0.1:3306", "root", "*pl3$#&XiC4Tn*AP13l#OKUY", "default")
require.NoError(t, err)
defer conn.Close()
_, err = conn.Execute(`select 1;`)
require.NoError(t, err)
} I think you can help me in many aspects, like fixing the code, adding unit tests in our CI, using |
So far I have figured out that it's not about spacial characters. any password larger than 19 characters is not working! So it's kinda a critical bug. sample not working password: abcdefghijklmnopqrsu |
I have spent many hours working on this issue, but it requires a good knowledge of mysql auth mechanism. so I might not be able to fix it very soon. |
Thanks, that's very helpful. I'll take a look soon |
136935a is the first bad commit |
Affected version: 1.8.0
Latest working version: 1.7.0
Reproduction Steps
1- mysql server with complex password and caching_sha2_password as default
2-
then you will see this error:
The text was updated successfully, but these errors were encountered: