Hi
I am trying to connect with mysql
code: -
#! /usr/bin/perl
-w

use warnings;
use DBI;


my $host ="xyz";
my $user ="user";
my $pass ="mysql";
my $db_name ="test";


$dsn ="DBI:mysql:database=$db_name;host=$host";
$dbh = DBI->connect($dsn,$user,$pass) or die "Cannot able to connect: $!\n";

error come: -

Name "main::dbh" used only once: possible typo at ./Test_connect.pl line 14.
install_driver(mysql) failed: Can't load
'/usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/auto/DBD/mysql/mysql.so'
for module DBD::mysql: libmysqlclient.so.10: cannot open shared object file:
No such file or directory at
/usr/lib/perl5/5.8.3/i386-linux-thread-multi/DynaLoader.pm line 229.
 at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at ./Test_connect.pl line 14

I am using  fc 2
DBI -1.3
DBD-mysql-2
Perl 5

Pls help me out .
bye
Rakesh

Reply via email to