Perl DBD hell

I’m trying to run pt-online-schema-change on a Centos 5 server. It worked perfectly on my test database which runs on a different server, but this server keeps giving me this error:
perl: symbol lookup error: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init

I’ve installed DBD version 4 like this:
perl Makefile.PL --libs="-L/usr/lib -lmysqlclient.so.15" \ --cflags=-I/usr/include/mysql
sudo make install

and I’ve run ldconfig, but the .so still doesn’t point to libmysqlclient:
ldd /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so
linux-gate.so.1 => (0x003e5000)
libc.so.6 => /lib/i686/nosegneg/libc.so.6 (0x00b28000)
/lib/ld-linux.so.2 (0x00ab3000)

And I’ve tried everything in this list:
http://dev.mysql.com/doc/refman/5.6/en/perl-support-problems.html

Any ideas?

thanks,
imran

Hi Imran,
When I tested your command, I got this error:

Note (probably harmless): No library found for -lmysqlclient.so.15

You should try again with -lmysqlclient instead and also make sure that -L path contains the libmysqlclient.so* files. In my case they were stored in /usr/lib64/mysql on CentOS 5 64bit:

perl Makefile.PL --libs="-L/usr/lib64/mysql -lmysqlclient" --cflags=-I/usr/include/mysql
make
make install

Here’s my ldd:

ldd /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so
linux-vdso.so.1 => (0x00007fff10b8c000)
libmysqlclient.so.15 => /usr/lib64/mysql/libmysqlclient.so.15 (0x00002b1240e35000)

I am curious why you need to link to that particular libmysqlclient.so.15? What nuances do you have in your configuration?