[rt-users] Debian setup: postgres problem?
Stephen Quinney
stephen.quinney at computing-services.oxford.ac.uk
Tue Jun 29 04:41:01 EDT 2004
On Mon, Jun 28, 2004 at 12:07:49PM +1000, Jens Porup wrote:
> But a simple Perl script connects to the database without dying, like so:
>
> use DBI;
> my $dsn = "dbi:Pg:dbname=template1";
>
> ###
> ### But this dsn fails!!
> ### my $dsn = "dbi:Pg:dbname=template1:host:localhost";
>
> ###
> ### For some reason adding host:localhost makes everything die!!!
>
> my $dbh = DBI->connect($dsn, "rtuser", "wibble") or die "doh!\n";
Having looked at the perldoc for DBD::Pg I can see that the $dsn which
died on connecting in this script is wrong. You want something like:
$dsn = "dbi:Pg:dbname=template1;host=localhost;"
Try it again with that dsn and see if you can connect to the database.
Stephen
More information about the rt-users
mailing list