Add note about default-auth for MySQL 8.0 clients (#2669) #2741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cherry-pick #2669 to release-2.1
What is changed, added or deleted? (Required)
The MySQL command line client (
mysql) as well as thelibmysqlclientclient library have changed their default authentication plugin. See https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password for more information about that change.It's no longer possible to connect to a TiDB Server using those clients if the user account has a password set, unless the
default-auth=mysql_native_passwordoption is used.This behavior can be seen in this example:
Note that the error message says "using password: NO", even though a password is given on the command line.
The
--default-auth=mysql_native_passwwordoption allows the connection to succeed:This patch makes several updates to pages in the documentation that deal with MySQL compatibility, setting passwords, and connecting to TiDB using MySQL clients.
Which TiDB version(s) do your changes apply to? (Required)
If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-4.0, needs-cherry-pick-3.1, needs-cherry-pick-3.0, and needs-cherry-pick-2.1.
What is the related PR or file link(s)?