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/ undefined symbol: mysql_init

I’ve installed DBD version 4 like this:
perl Makefile.PL --libs="-L/usr/lib" \ --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/ => (0x003e5000) => /lib/i686/nosegneg/ (0x00b28000)
/lib/ (0x00ab3000)

And I’ve tried everything in this list:

Any ideas?


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

Note (probably harmless): No library found for

You should try again with -lmysqlclient instead and also make sure that -L path contains the* 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 install

Here’s my ldd:

ldd /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/ => (0x00007fff10b8c000) => /usr/lib64/mysql/ (0x00002b1240e35000)

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