
arush_pareek
Novice
Jun 8, 2011, 10:26 PM
Post #1 of 2
(12439 views)
|
Error while connecting to postgres through DBI
|
Can't Post
|
|
$ cat tt.pl #!/usr/bin/perl use DBI; my $dbh = DBI->connect('dbi:Pg:dbname=postgres;host=laddakh','postgres','postgres',{AutoCommit=>1,RaiseError=>1,PrintError=>0}); ERROR :: $ perl tt.pl DBI connect('dbname=postgres;host=laddakh','postgres',...) failed: could not connect to server: Connection refused Is the server running on host "laddakh" and accepting TCP/IP connections on port 5432? at tt.pl line 5 Here laddakh is the server name where my postgres is installed.
|