Percona toolkit - Unable to connect to Mysqldb - MAC

Hi,

I am unable to run percona toolkit in mac. I am getting the following error.

Cannot connect to MySQL: Cannot connect to MySQL because the Perl DBD::mysql module is not installed or not found. Run ‘perl -MDBD::mysql’ to see the directories that Perl searches for DBD::mysql. If DBD::mysql is not installed, try:
Debian/Ubuntu apt-get install libdbd-mysql-perl
RHEL/CentOS yum install perl-DBD-MySQL
OpenSolaris pgk install pkg:/SUNWapu13dbd-mysql
18 at ./pt-online-schema-change line 8758.

Need help.

I ran the following on my mac and the toolkit is able to connect to a remote MySQL server:

$ brew install percona-toolkit
$ brew install mysql-client
$ brew link --force mysql-client
$ pt-mysql-summary -h 10.10.10.203 -P 8035 --user msandbox --password msandbox
...
# Report On Port 8035 ########################################
                     User | msandbox@%
                     Time | 2024-06-04 15:42:54 (UTC)
                 Hostname | remotedblion
                  Version | 8.0.35-27 Percona Server (GPL), Release 27, Revision 2f8eeab2

Thanks, Matt! I am able to get pt-mysql-summary work. But the pt-online-schema-change errors. Is pt-online-schema-changes working for you?

Thanks!

Can you show the errors? It’s hard to help without seeing what you are seeing.

Cannot connect to MySQL: Cannot connect to MySQL because the Perl DBD::mysql module is not installed or not found. Run ‘perl -MDBD::mysql’ to see the directories that Perl searches for DBD::mysql. If DBD::mysql is not installed, try:
Debian/Ubuntu apt-get install libdbd-mysql-perl
RHEL/CentOS yum install perl-DBD-MySQL
OpenSolaris pgk install pkg:/SUNWapu13dbd-mysql
18 at ./pt-online-schema-change line 8758.

Any help with this please

Hello @mysqlcoe The forums are a volunteer effort from Percona employees and community members. If you need immediate help, you can engage us with a support contract.

I had no issues running pt-osc on my mac:

$ sw_vers
ProductName:		macOS
ProductVersion:		13.6.7
BuildVersion:		22G720

$ pt-online-schema-change --version
pt-online-schema-change 3.5.5

$ pt-online-schema-change -h 10.10.10.203 --user msandbox --password msandbox D=world,t=city,P=8035 --alter "ADD COLUMN c13 varchar(20)" --execute
No slaves found.  See --recursion-method if host blacklion has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.
Operation, tries, wait:
  analyze_table, 10, 1
  copy_rows, 10, 0.25
  create_triggers, 10, 1
  drop_triggers, 10, 1
  swap_tables, 10, 1
  update_foreign_keys, 10, 1
Altering `world`.`city`...
Creating new table...
Created new table world._city_new OK.
Altering new table...
Altered `world`.`_city_new` OK.
2024-06-04T19:53:17 Creating triggers...
2024-06-04T19:53:17 Created triggers OK.
2024-06-04T19:53:17 Copying approximately 4046 rows...
2024-06-04T19:53:17 Copied rows OK.
2024-06-04T19:53:17 Analyzing new table...
2024-06-04T19:53:17 Swapping tables...
2024-06-04T19:53:17 Swapped original and new tables OK.
2024-06-04T19:53:17 Dropping old table...
2024-06-04T19:53:17 Dropped old table `world`.`_city_old` OK.
2024-06-04T19:53:17 Dropping triggers...
2024-06-04T19:53:17 Dropped triggers OK.
Successfully altered `world`.`city`.