Hi Everyone,
How can I connect with MySQL database using Perl?
Here is the source code I am using:
I checked the log file of Apache and I found the error message:
Is there any module I should install and link with Perl? and how can I do so?
Thanks in advance,
How can I connect with MySQL database using Perl?
Here is the source code I am using:
Code:
#!C:\perl\bin\perl.exe
print "Content-type: text/html\n\n";
use DBI;
$db="perl_test";
$host="localhost";
$port="3306";
$userid="root";
$passwd="";
$connectionInfo="DBI:mysql:database=$db;$host:$port";
$dbh = DBI->connect($connectionInfo,$userid,$passwd);
Code:
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: C:/perl/site/lib C:/perl/lib .)
Thanks in advance,