# Issue with pt-index-usages command

**URL:** <https://forums.percona.com/t/issue-with-pt-index-usages-command/1999>\
**Category:** Other MySQL® Questions\
**Created:** [February 19, 2013, 4:44am UTC](https://forums.percona.com/t/issue-with-pt-index-usages-command/1999 "2013-02-19T04:44:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bishu](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/bishu/32/912_2.png) [@bishu](https://forums.percona.com/u/bishu)\
**Post date:** [February 19, 2013, 4:44am UTC](https://forums.percona.com/t/issue-with-pt-index-usages-command/1999/1 "2013-02-19T04:44:10Z")

</div>

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](http://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!

---

<div class="post-metadata">

**Author:** ![jaime](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jaime](https://forums.percona.com/u/jaime)\
**Post date:** [March 13, 2013, 12:29am UTC](https://forums.percona.com/t/issue-with-pt-index-usages-command/1999/2 "2013-03-13T00:29:48Z")

</div>

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
