liony301 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I've configured perl modules using cpan command -
Installed modules are:
I've installed mysql version 5.1.55 from the source. Installed perl rpm version- perl-5.8.8-32.el5_5.2.
I've configured perl modules using cpan command -
cpan -i Bundle::DBD::mysql
Installed modules are:
DBD::mysql DBI ExtUtils::MakeMaker Perl Term::ReadKey Test::Simple
Now I've one script to check if I could connect to mysql. Here is the script which I used to test -
However on execution I get following error -#!/usr/bin/perl -w use strict; use warnings; use DBI; my $db="test"; my $host="localhost"; my $user="test"; my $password="test"; #connect to MySQL database my $dbh = DBI->connect ("DBI:mysql:database=$db:host=$host",$user,$pas +sword) or die "Can't connect to database: $DBI::errstr\n"; #disconnect from database $dbh->disconnect or warn "Disconnection error: $DBI::errstr\n"; exit;
It would be really great if you can guide me to resolve this issue.perl: symbol lookup error: /usr/lib64/perl5/site_perl/5.8.8/x86_64-lin +ux-thread-multi/auto/DBD/mysql/mysql.so: undefined symbol: mysql_init
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBD::mysql error
by Anonymous Monk on Mar 25, 2011 at 00:18 UTC | |
by liony301 (Novice) on Mar 25, 2011 at 00:40 UTC | |
by Anonymous Monk on Mar 25, 2011 at 02:13 UTC | |
Re: DBD::mysql error
by andal (Hermit) on Mar 25, 2011 at 08:10 UTC | |
by liony301 (Novice) on Mar 25, 2011 at 17:31 UTC | |
by Eliya (Vicar) on Mar 25, 2011 at 19:03 UTC | |
by liony301 (Novice) on Mar 30, 2011 at 00:31 UTC | |
Re: DBD::mysql error
by Anonymous Monk on Mar 25, 2011 at 05:01 UTC | |
by liony301 (Novice) on Mar 25, 2011 at 17:11 UTC | |
Re: DBD::mysql error
by yerbol (Initiate) on May 12, 2011 at 21:49 UTC |
Back to
Seekers of Perl Wisdom