-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Can't connect using mysql client (using password: NO) #14021
Comments
@OuSatoru, I can't reproduce this issue with |
Reproducible on MySQL 8 client bundled with Ubuntu with master version of TiDB. The problem is authentication plugin mismatch. While TiDB wants the client to authenticate using You can force the MySQL client to use the native password plugin with: mysql --default-auth=mysql_native_password -h ::1 -P 4000 -u user -pPassword ...
# ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Thank you very much! I didn't see the question! My mysql version was "mysql Ver 8.0.17 for Linux on x86_64 (MySQL Community Server - GPL)" on Centos7, successfully connect to tidb with mysql_native_password! |
This has also been added to the TiDB FAQ. With the root cause identified, I am going to go ahead and close this issue. Thanks! |
Bug Report
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
connect using
mysql -h x.x.x.x -P 4000 -u root -p
mysql -h x.x.x.x -P 4000 -u root -p mypassword
mysql -h x.x.x.x -P 4000 -u root -pmypassword
What did you expect to see?
connect success
What did you see instead?
Access denied for user 'root'@'xx.xx.xx.xx' (using password: NO)
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?Release Version: v3.0.7
Git Commit Hash: 84e4386
Git Branch: HEAD
UTC Build Time: 2019-12-04 10:08:24
GoVersion: go version go1.13 linux/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
mysql -V
mysql Ver 8.0.17 for Linux on x86_64 (MySQL Community Server - GPL)
Can connect when tidb installed without password.
Can't connect after set password with
SET PASSWORD FOR 'root'@'%' = 'xxx';
Can connect using database tools like DataGrip.
The text was updated successfully, but these errors were encountered: