At 7:12 AM +0100 1/31/11, Marek Stepanek wrote:
I want to install since four days now DBD::mysql on my MBP, with 64bit
Intel chip.
I tried with both version of MYSQL Community Server:
mysql-5.5.8-osx10.6-x86_64.tar.gz (the 64bit version)
and
mysql-5.5.8-osx10.6-x86.tar.gz (the 32bit version)
I think I am not doing something wrong, installing the MYSQL Server. (:
Meanwhile I am a Professional, doing it :)
But installing DBD::mysql fails already with make, and both servers: the
64bit and the 32bit ...
First my Perl:
% perl -v
This is perl, v5.10.0 built for darwin-thread-multi-2level
The installing procedure of DBD::mysql fails like follows. I am in the
folder ~/.cpanplus/5.10.0/build/DBD-mysql-4.018:
1.
% perl Makefile.PL
Here one warning is perhaps important:
Multiple copies of Driver.xst found in:
/Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/
/System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/DBI/
at Makefile.PL line 907
Using DBI 1.611 (for perl 5.010000 on darwin-thread-multi-2level)
installed in /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/
2. I fire up the MYSQL-Server to grant the privileges for the test user:
% mysql> grant all privileges on test.* to 'mstep'@'localhost'
identified by 's3kr1t';
3. % make
And here are starting serious problems: I get plenty of following warnings:
dbdimp.c: In function 'alloc_param':
dbdimp.c:212: warning: format not a string literal and no format arguments
4. % make test
4.(Var) % sudo make test
Both are failing with following messages:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.t .................. 1/6
# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't load
'/Users/mstep/.cpanplus/5.10.0/build/DBD-mysql-4.018/blib/arch/auto/DBD/mysql/mysql.bundle'
for module DBD::mysql:
dlopen(/Users/mstep/.cpanplus/5.10.0/build/DBD-mysql-4.018/blib/arch/auto/DBD/mysql/mysql.bundle,
2): Library not loaded: libmysqlclient.16.dylib
# Referenced from:
/Users/mstep/.cpanplus/5.10.0/build/DBD-mysql-4.018/blib/arch/auto/DBD/mysql/mysql.bundle
# Reason: image not found at
/System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm
line 207.
# at (eval 7) line 2
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
Bailout called. Further testing stopped: Unable to load DBD::mysql
FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 255
Could somebody help me out? Please!
These are the notes I made the last time I spent a week trying to
install MySQL, DBI and DBD. They worked for me at the time. Some of
these steps may no longer be necessary or correct.
I hope this helps. Good luck.
Installing MySQL, DBI & DBD
MySQL
Download MySQL package installer from MySQL.org
Install MySQL
Install MySQLStartupItem.pkg
Restart
> mysqladmin -u root password [ new password ]
DBI
cpan> install Bundle::DBI
DBD
cpan> look DBD::mysql
> perl Makefile.PL --testhost=your_server --testport=3306
--testdb=test --testuser=root --testpassword=your_root_password
--mysql_config="/usr/local/mysql/bin/mysql_config"
> sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
> make
> make test
> sudo make install
Other resources:
http://www.thescripts.com/forum/thread676055.html
http://bugs.mysql.com/bug.php?id=367
http://forums.mysql.com/read.php?51,168255,173617#msg-173617
http://bugs.mysql.com/bug.php?id=30160