-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
using MySQL 5.5 and 5.6 clients connecting with a passwordless account to tidb fail #32334
Comments
confirming from Dveeden:
|
/assign |
Note that there is no issue with This only affects the situation where:
I think the severity of this could be considered as |
The problem we need to solve only affects if when all the following are true:
The problem is that TiDB sends an OK early on in the handshake, as there is no password to check. This is fine for MySQL 5.7 and later. As MySQL 5.1 and earlier doesn't support plugable authentication this is also fine. The fix in #32338 is to send an auth-switch-request and waiting on a reply before sending an OK. However #33142 reverted this fix as this caused an issue with clients that use Go 1.3 and older. This is issue #33141. I would expect there to be more installations that use Go 1.3 or older than there are installations that are affected by this issue. So reverting the fix was the right thing to do. To move forward we could:
The https://github.com/dveeden/tidb_client_test tool isn't able to find the incompatibility as it only tests MySQL clients. As many MySQL connectors are based on libmysqlclient, this is often fine. However Go and Java are some of the examples that are not based on libmysqlclient. |
I've created a very basic test for the Go client: https://github.com/dveeden/tidb_client_test/tree/master/go-mysql-driver |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
dbdeployer downloads get-unpack mysql-5.5.62.tar.xz
dbdeployer downloads get-unpack mysql-5.6.44.tar.xz
CREATE USER 'nopw'@'%' IDENTIFIED WITH mysql_native_password
2. What did you expect to see? (Required)
connect successully
3. What did you see instead (Required)
root@wkload-0:/upgrade-test# /root/opt/mysql/5.5.62/bin/mysql -u nopw -h tiup-peer -P3390
ERROR 2012 (HY000): Error in server handshake
4. What is your TiDB version? (Required)
v5.5.0-nightly-20220208
The text was updated successfully, but these errors were encountered: