Here is my script
#!/usr/bin/perl
#
# Cannonical Perl DBI connection to Mysql.
##############################################################################
use DBI;
$db = "test"; # your username (= login name = account name )
$host = "127.0.0.1"; # = "localhost", the server your are on.
$user = ""; # your Database name is the same as your account name.
$pwd = ""; # Your account password
# connect to the database.
$dbh = DBI->connect( "DBI:mysql:$db:$host", $user, $pwd)
or die "Connecting : $DBI::errstr\n ";
$sql = "SELECT * FROM users";
# executing the SQL statement.
$sth = $dbh->prepare($sql) or die "preparing: ",$dbh->errstr;
$sth->execute or die "executing: ", $dbh->errstr;
print "content-type: text/html\n\n";
# one of the functions to retrieve data from the table results
# check perldoc DBI for more methods.
while ($row = $sth->fetchrow_hashref)
{
print $row->{'username'},'<BR>';
}
The errors that i recieve
------------------------------------
Can't load 'C:/Perl/site/lib/auto/DBI/DBI.dll' for module DBI:
load_file:─ίΊ
▐ΪάΊ ϊΫΊάΪⁿ Ίά
ίΊΪΎΏώ≤Ϊί▀ ύ
ΆάϋΎ�ώ≤Ή▌Ίύ
ΉΎΊ▄ϊά at C
lib/DynaLoader.pm line 206.
BEGIN failed--compilation aborted at C:/Perl/site/lib/DBI.pm line 255.
Compilation failed in require at remote_db_connection.pl line 7.
BEGIN failed--compilation aborted at remote_db_connection.pl line 7.
-------------------------------------------------
I have the Active Perl 5.6 build 635.
The Mysql is on my system.
I have the DBI and DBD::Mysql as well.
It seems that there is no linking :(