Skip to content
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

Support MySQL client 9.0 that removes mysql_native_password plugin #2448

Open
yahonda opened this issue Aug 5, 2024 · 1 comment
Open

Support MySQL client 9.0 that removes mysql_native_password plugin #2448

yahonda opened this issue Aug 5, 2024 · 1 comment
Labels
type/feature-request Categorizes issue as related to a new feature.

Comments

@yahonda
Copy link
Member

yahonda commented Aug 5, 2024

Feature Request

I want tiup playground supports to create root user with the caching_sha2_password plugin because MySQL client 9.0 that removes mysql_native_password plugin.

Describe the feature you'd like:
MySQL 9.0.0 removes mysql_native_password plugin.

https://dev.mysql.com/doc/relnotes/mysql/9.0/en/news-9-0-0.html

The mysql_native_password authentication plugin, deprecated in MySQL 8.0, has been removed, and the server now rejects mysql_native authentication requests from older client programs which do not have CLIENT_PLUGIN_AUTH capability. For backward compatibility, mysql_native_password remains available on the client; the client-side built-in authentication plugin has been converted into a dynamically loadable plugin.

Why the featue is needed:
If macOS uses installs mysql client, now it installs MySQL client 9.0.1, then users will get this error.

% brew install mysql-client
% tiup playground v8.1.0
% mysql --comments --host 127.0.0.1 --port 4000 -u root
ERROR 2059 (HY000): Authentication plugin 'mysql_native_password' cannot be loaded: dlopen(/opt/homebrew/Cellar/mysql-client/9.0.1/lib/plugin/mysql_native_password.so, 0x0002): tried: '/opt/homebrew/Cellar/mysql-client/9.0.1/lib/plugin/mysql_native_password.so' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mysql-client/9.0.1/lib/plugin/mysql_native_password.so' (no such file), '/opt/homebrew/Cellar/mysql-client/9.0.1/lib/plugin/mysql_native_password.so' (no such file)
~ %

Describe alternatives you've considered:
Workaround is installing mysql-client@8.4 explicitly as follows.

% brew uninstall mysql-client
% brew install mysql-client@8.4
% echo 'export PATH="/opt/homebrew/opt/mysql-client@8.4/bin:$PATH"' >> ~/.zshrc
% exec $SHELL -l
% mysql --comments --host 127.0.0.1 --port 4000 -u root

mysql> select host,user,plugin from mysql.user\G
*************************** 1. row ***************************
  host: %
  user: root
plugin: mysql_native_password
1 row in set (0.00 sec)

Teachability, Documentation, Adoption, Migration Strategy:

@yahonda yahonda added the type/feature-request Categorizes issue as related to a new feature. label Aug 5, 2024
@yahonda
Copy link
Member Author

yahonda commented Aug 14, 2024

It looks like duplicate with pingcap/tidb#54138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature-request Categorizes issue as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant