coonecting to mysql from perl uisng apache webserver?
I am trying to test connectivity for the first time.like this
#!/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";
but i am getting this error agian and again. 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
Is there anything i need to configure in my pc before doing this.
No comments:
Post a Comment