Backporting client support for caching_sha2_password
auth
#219
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.
The MySQL client API in our fork of vitess is limited to the
mysql_native_password
auth plugin, but the default auth plugin as of MySQL 8.0 iscaching_sha2_password
. This means that to use Dolt binlog replication, customers either have to change the default auth plugin in MySQL or they have to create a user that is identified with the oldermysql_native_password
auth plugin. This additional configuration step adds friction for customers wanting to try out Dolt binlog replication.This PR pulls in selected changes from the tip of
vitessio/vitess
to pick up client support for connecting to MySQL servers that default tocaching_sha2_password
auth plugin (and will still fall back tomysql_native_password
). All of these changes are pulled directly fromvitessio/vitess
, without any other changes mixed in.I'm not aware of anywhere else in our codebase where we're using the MySQL client API from vitess. As far as I know, it's only used by the binlog implementation. That means this change shouldn't have any effect on other parts of Dolt/GMS, and I've gone ahead and run the Dolt CI tests against this change as a sanity check:
caching_sha2_password
upgrade dolt#5339I've pulled over additional tests from the tip of vitess for this logic. I've also tested locally and confirmed that my binlog replication integ tests all pass with this change, and no longer require overriding the default auth plugin for the MySQL server. I've also started on some additional binlog replication integ tests to make sure we cover password/no-password and ssl/no-ssl.