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

Wrong using password flag when the user is not found #332

Closed
djshow832 opened this issue Jul 19, 2023 · 1 comment · Fixed by #333
Closed

Wrong using password flag when the user is not found #332

djshow832 opened this issue Jul 19, 2023 · 1 comment · Fixed by #333

Comments

@djshow832
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql -h127.1 -udummy -P6000 -pdummy
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'dummy'@'127.0.0.1' (using password: NO)

The user dummy is not created.

2. What did you expect to see? (Required)

ERROR 1045 (28000): Access denied for user 'dummy'@'127.0.0.1' (using password: YES)
The value of using password should be YES.

3. What did you see instead (Required)

ERROR 1045 (28000): Access denied for user 'dummy'@'127.0.0.1' (using password: NO)
The value of using password is NO.

4. What is your version? (Required)

master

@djshow832
Copy link
Collaborator Author

The reason:
When TiProxy handshakes with TiDB, it sends auth_plugin=unknown_auth_plugin and auth_data=nil. TiDB sees that auth_data=nil and then sets using password to NO.

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

Successfully merging a pull request may close this issue.

1 participant