You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#28082093: LIBMYSQLCLIENT CONNECTING TO OLDER MYSQL 5
SERVERS RESULTS IN BAD HANDSHAKE
If no default authentication method is specified via a mysql_options()
libmysql will default to the "compiled in default", which is the client
plugin for caching_sha2.
This in itself is fine for a server that supports pluggable authentication
(5.5+).
But on older servers that do not have pluggable authentication expect
the response to be either "mysql_native" or "old, aka. mysql_323".
And if they receive any reply (caching_sha2's in this case) that doesn't
conform to this they'd bail out with "Bad handshake" error.
Unfortunately, the --default-auth option had no effect if the server won't
advertise that it supports pluggable authentication, thus, even the
--default-auth=mysql_native_password workaround won't do.
Fixed by:
1. Making sure --default-auth on the client side works even for
non-pluggable authentication servers.
2. If no --default-auth is specified instead of picking caching_sha2 as a
compiled-in default the client will pick mysql_native instead iff the server
doesn't support pluggagle authentication (<= 5.1).
Unfortunately, only manual testing can be done since it'd require an
actual live 5.1 server, so no regression test is added.
Change-Id: Ifcaa6404503bf1ddaf7f21ddbdcc3d8767711787
0 commit comments