Hi folks,
I am facing problems in running mysql with apache and perl on my system.
The version of mysql i am using is 3.23.39
Below is the program i wrote
to check the mysql connectivity with perl.
#!/usr/bin/perl
use lib qw(/home/www/pm);
$ENV{'DBI_DSN' } = "dbi:mysql:z";
$ENV{'DBI_USER'} = "db";
$ENV{'DBI_PASS'} = "db";
my @t = (localtime)[5,4,3];
my $today = join '-', ($t[0]+"1900", $t[1]+1, $t[2]);
use DBI;
my $database = $ENV{DBI_DSN};
my $users = $ENV{DBI_USER};
my $password = $ENV{DBI_PASS};
my $dbh = DBI->connect($database, $users, $password) || die
$DBI::errstr;
my $query = "select id from users limit 10";
my $sth = $dbh->prepare($query);
$sth->execute();
my $obj = $sth->fetchall_arrayref();
if(defined $obj && @$obj){
foreach my $row (@$obj){
my $id = $$row[0];
print "Id = $id \n";
}
}
$sth->finish();
$dbh->disconnect();
I am getting the following error.
install_driver(mysql) failed: Can't load
'/usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBD/mysql/mysql.so' for
module DBD::mysql: libmysqlclient.so.6: cannot open shared object file: No
such file or directory at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm
line 169.
at (eval 1) line 3
Perhaps a required shared library or dll isn't installed where expected
at /home/pawan/check.pl line 19
please tell me what is wrong?
subhro.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php