On Tue, Dec 22, 2009 at 10:03 PM, Peter Hesp <[email protected]> wrote:

> Hi and merry Xmas,,
> I have been trying install DBI for mysql on my, recently upgraded to 'snow
> leopard', Mac Book with no luck.
>
> I have included the requested output from the installation  process, which
> appeared to me to be OK but when tried my test script also included I
> could not connect to the database.
>
> If you can check this out and advise of a solution or direct me to on it
> would be greatly appreciated.
>
> Thanks
>
> Peter Hesp.
>
> peter-hesps-macbook:DBI-1.609 peterhesp$ perl Makefile.PL
> Your perl was compiled with gcc (version 4.2.1 (Apple Inc. build 5646)),
> okay.
>


[...log of successful build of DBI stripped...]




> All tests successful, 34 tests and 379 subtests skipped.
> Files=130, Tests=5825, 46 wallclock secs (36.79 cusr +  6.54 csys = 43.33
> CPU)
>



> ___________________________________________________________________________
> A TEST SCRIPT TO CONNECT TO THE DB
>
> #!/opt/local/bin/perl -w
> use strict;
> use DBI;
>
> my ( $user, $passwd, $connString);
>
> ($connString, $user, $passwd) =
> ("dbi:mysql:database=contacts;host=localhost", 'root','*******');
> my $dbh = DBI->connect($connString)
>                or die "Couldn't connect to database: " . DBI->errstr;
> my $sth = $dbh->prepare('SELECT * FROM people ')
>        or die "Couldn't prepare statement: " . $dbh->errstr;
>
> $sth->execute() ;
>
> AND ITS OUTPUT
>
> peter-hesps-macbook:cgi-bin peterhesp$ ./th_db.pl
> dyld: lazy symbol binding failed: Symbol not found: _mysql_init
>  Referenced from:
>
> /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/auto/DBD/mysql/mysql.bundle
>  Expected in: dynamic lookup
>
> dyld: Symbol not found: _mysql_init
>  Referenced from:
>
> /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/auto/DBD/mysql/mysql.bundle
>  Expected in: dynamic lookup
>
> Trace/BPT trap
>


Now show us the successful build of DBD::MySQL?


-- 
Jonathan Leffler <[email protected]>  #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply via email to