Skip to content

mysql-client 9.0 does not include mysql_native_password plugin #180498

@zhangyangyu

Description

@zhangyangyu

brew config

HOMEBREW_VERSION: 4.3.12
ORIGIN: https://github.com/Homebrew/brew
HEAD: 874d2da45344d3b27aa740e555b0210d8c474220
Last commit: 9 days ago
Core tap JSON: 08 Aug 13:26 UTC
Core cask tap JSON: 08 Aug 13:27 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Use MySQL command line client to connect old version MySQL servers using mysql_native_password auth method.

What happened (include all command output)?

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)

What did you expect to happen?

9.0 version client should connect successfully with mysql_native_password auth method. From MySQL 9.0, mysql_native_password is removed from built-in auth methods. But for backward compatibility, client should still include it but now it's not built-in but a dynamically loadable 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.

I think mysql-client should still include it. Otherwise, the new version client might not connect to old version servers.

Step-by-step reproduction instructions (by running brew commands)

brew install mysql-client
/opt/homebrew/Cellar/mysql-client/9.0.1/bin/mysql --comments -u '<user>' -h <host> -P <port> -D '<database>' --ssl-mode=VERIFY_IDENTITY --ssl-ca=/etc/ssl/cert.pem -p'<password>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReproducible Homebrew/homebrew-core bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions