Percona Toolkit 3.6.0 Usage Issue with MySQL Client 9.0 on Mac OS Sonoma

I installed the Percona toolkit 3.6.0 via Brew and it installed fine. But when I tried to use it, eg. pt-online-schema-change, it does not work because it depends on MySQL client 9.0. The error is this:

Cannot connect to MySQL: DBI connect('test;host=<some_prod_host>;mysql_read_default_group=client','test',...) failed: 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) at /opt/homebrew/Cellar/percona-toolkit/3.6.0_2/libexec/bin/pt-online-schema-change line 2345.
  1. What is the workaround for this?
  2. How can I install Percona toolkit 3.5.5 via Brew? I can’t seem to find the old formula anymore.
  3. Is there a way to install Percona toolk 3.6.0 with MySQL client 8.4 instead?
  4. I prefer not to run an alter user ... identified by caching_sha2_password since this is a production db.

Hello @brianestrada658,
We, Percona, do not manage the homebrew formula. We did not create it, we don’t manage it. Looking at the code, I see this line, homebrew-core/Formula/p/percona-toolkit.rb at a10991ef8325587a6b0b089e484045214aeccc08 · Homebrew/homebrew-core · GitHub, which requires mysql-client, it makes no indication of neding mysql 9. I know for certain that the toolkit itself does not have this dependency.

Answers:

  1. Install the toolkit manually from the .tar.gz from our website.
  2. All brew formulas are on github. Simply look through the git history for the version you want.
  3. The brew formula should be satisfied with any mysql version according to the code line above. I would ask in the homebrew support channels how to specify mysql 8.0, you don’t even need 8.4.
  4. mysql 9.0 does not support mysql_native_plugin at all. it was removed. you have no choice other than the sha2. If you are not using 9.0, then 8.0 an 8.4 should support native_password.

Try uninstalling the toolkit, and mysql. then install mysql8 first, then the toolkit. maybe that will work.

1 Like