4

perl & mysql

view full story
linux-howto

http://www.linuxquestions.org – Hi am running Centos 5.4 and would like to write a small perl script to collect some info from mysql. so I went yum install perl-DBI yum install perl-DBD-mysql then nano perl.pl --- #!/bin/perl use Mysql; $host=localhost; $database=mydb; $user=username; $pw=password; $connect = Mysql->connect($host, $database, $user, $pw); # SELECT DB $connect->selectdb($database); --- however when I try run it I get this error. Can't locate Mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/p (HowTos)