my $dbName="dh";
my $Server="127.0.0.1";
my $Port="3306";
my $Data="DBI:mysqldbNameServerPort";
my $dbUserName="admin";
my $dbUserPass="webadmin";
my $Conn=DBI->connect($data,$dbUserName,$dbUserPass);
my $Sql="select id,user from users; ";
my $Rs=$Conn->prepare($Sql);
$Rs->execute() or die "Unable execute SQL: $Rs->errstr";
while (($row = $Rs->fetchrow_arrayref)){
print "$row->['0'] $row->['1'] $orw->['2']\n";
}
出错信息为:perl 123
"dh" is not exported by the DBI module
Can't continue after import errors at 123 line 3
BEGIN failed--compilation aborted at 123 line 3.