CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: DBI:
Error while connecting to postgres through DBI

 



arush_pareek
Novice

Jun 8, 2011, 10:26 PM

Post #1 of 2 (8435 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.


miller
User

Jun 9, 2011, 1:07 AM

Post #2 of 2 (8432 views)
Re: [arush_pareek] Error while connecting to postgres through DBI [In reply to] Can't Post

Just read your replies on perlmonks: http://www.perlmonks.com/?node_id=908837.

- Miller

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives