You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug because MySQL protocol doesn't define which encoding is used to encode password. So library can't guarantee login is succeeded when password is non-ASCII unicode.
You can manually encode your password and pass the binary password to PyMySQL.
OperationalError: 1045 on login if password has non ascii characters
Step to reproduce:
1.- Install PyMySQL[rsa] and cryptography.
2.- Create a mysql 8 instance
docker run --name some-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=my-sécrét-pw -e MYSQL_DATABASE=dbase -d mysql:8.0
3.- Wait like 10 seconds to the container fully starts.
4.- Try to connect
It will fail with
OperationalError: (1045, "Access denied for user 'root'@'172.17.0.1' (using password: YES)")
However, if you use an ascii password like "my-secret-pw", it will work just fine.
The text was updated successfully, but these errors were encountered: