Issue with pt-index-usages command

Hi,

I have downloaded Percona Toolkit for MAC(OS X 10.8.2 (12C2034)) os. i have installed it and run but i am getting error message while running command
like ‘pt-index-usages’, ‘pt-duplicate-key-checker’ specially when there is database connectivity required. getting below error:

dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql /mysql.bundle
Expected in: flat namespace

dyld: Symbol not found: _mysql_init
Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql /mysql.bundle
Expected in: flat namespace

Trace/BPT trap: 5

Here are the additional(terminal details from sql and perl) details below.

Terminal → mysql -V
mysql Ver 14.14 Distrib 5.1.44, for apple-darwin8.11.1 (i386) using EditLine wrapper

Terminal → perl -V
Summary of my perl5 (revision 5 version 12 subversion 4) configuration:

Platform:
osname=darwin, osvers=12.0, archname=darwin-thread-multi-2level
uname=‘darwin b1017.apple.com 12.0 darwin kernel version 12.0.0: tue may 15 23:31:29 pdt 2012; root:xnu-2050.6.70~1release_x86_64 x86_64 ’
config_args=’-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=clang’
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc=‘clang’, ccflags =‘-arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include’,
optimize=‘-Os’,
cppflags=‘-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include’
ccversion=‘’, gccversion=‘4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)’, gccosandvers=‘’
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype=‘long’, ivsize=8, nvtype=‘double’, nvsize=8, Off_t=‘off_t’, lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld=‘clang -mmacosx-version-min=10.8’, ldflags =‘-arch i386 -arch x86_64 -fstack-protector -L/usr/local/lib’
libpth=/usr/local/lib /usr/lib
libs=-ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
gnulibc_version=‘’
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=’ ’
cccdlflags=’ ‘, lddlflags=’-arch i386 -arch x86_64 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector’

Please help me to short out this issue.

Thanks in advance!

Hi,
How did you install Percona Toolkit? The easiest way of getting the appropriate dependencies for the Mac is to use MacPorts. First, download and install MacPorts and on the terminal, run:
$sudo port selfupdate
$sudo port install percona-toolkit

Test:
$pt-duplicate-key-checker -h192.168.1.100,u=mysql_user,p=mysql_password