DBD::mysql gives mysql_init not found

Posted by highBandWidth on Server Fault See other posts from Server Fault or by highBandWidth
Published on 2013-11-11T21:33:02Z Indexed on 2013/11/11 21:56 UTC
Read the original article Hit count: 414

Filed under:
|

I have to install a non-admin copy of mysql and perl module DBD::mysql in my home directory. I installed mysql in ~/software/db/mysql and this works since I can start and stop the server and go to the mysql prompt.

Then, I downloaded the perl module and installed it using

perl Makefile.PL PREFIX=~/myperl/ LIB=~/myperl/lib/lib64/perl5/ --mysql_config=/my_home/software/db/mysql/bin/mysql_config --libs=/myhome/software/db/mysql/lib/libmysqlclient.a 
make
make install

I did this to use the statically linked mysql client library.

perl -MDBD::mysql -e 1

gives no errors.

However, when I actually try to use the module, I get /usr/bin/perl: symbol lookup error: /myhome/myperl/lib/lib64/perl5/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init

© Server Fault or respective owner

Related posts about mysql

Related posts about perl