我正在尝试第一次测试连接性。像这样
#!/usr/bin/perl -w
use DBI;
# DBD::ODBC
use CGI::Carp qw(fatalsToBrowser);
my $dsn = 'DBI:ODBC:Driver={SQL Server}';
#my $host = 'localhost';
my $host = 'mysql';
my $database = 'test';
my $user = 'root';
my $auth = 'mukesh';
# Connect via DBD::ODBC by specifying the DSN dynamically.
my $dbh = DBI->connect("$dsn;Server=$host;Database=$database",$user,$auth) || die "Database connection not made: $DBI::errstr";
但我一次又一次地收到这个错误。
Got error [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (SQL-08001) [state was 08001 now 01000]
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (SQL-01000) when connecting to
在执行此操作之前,我需要在我的电脑中配置什么吗?