From: | "Thomas J Keller" <kellert(at)ohsu(dot)edu> |
---|---|
To: | pdxpug(at)postgresql(dot)org |
Subject: | connection question |
Date: | 2007-02-17 00:56:36 |
Message-ID: | CF333C1C-78D0-4267-B57B-4FBE43723674@ohsu.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pdxpug |
Hi all,
I've only used my Pg database on my host machine, and I'm not sure
how to connect from another machine.
DBI connect('database=
dseq_samples;host=littlecatb.ohsu.edu','kellert',...) failed: could
not connect to server: Connection refused
Is the server running on host "littlecatb.ohsu.edu" and
accepting
TCP/IP connections on port 5432?
at /Users/kellert/bin/insert_pwd_record.pls line 16
The server is running on littlecatb, but I don't know if it's
accepting connections. I'm sure this is in the Douglas(s) book and
I'll look it up. ... but if someone knows off the top of their head:
help would be appreciated.
Here's the connection snippet of my script:
use DBI;
my $url = "dbi:Pg:database=dseq_samples;host=littlecatb.ohsu.edu";
my %attrs = ( RaiseError => 1,
PrintError => 0,
AutoCommit => 1,
);
my $username = "kellert";
my $password = "";
my $dbh = DBI->connect($url, $username, $password, \%attrs) or
die "Can't connect to PostgreSQL:
$DBI::errstr (DBI::err)\n";
Tom K
From | Date | Subject | |
---|---|---|---|
Next Message | markwkm | 2007-02-18 23:32:14 | Re: connection question |
Previous Message | Selena Deckelmann | 2007-02-13 23:51:11 | march presentation |