[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug or newbie stupidity?



On Thu, Apr 27, 2006 at 04:27:05PM +0100, Simon Waters wrote:

> ----------------------------------------------------------------------------------------
> #!/usr/bin/perl
> use strict;
> use warnings;
> use DBI;
> 
> my
> $dbh=DBI->connect("dbi:Pg:dbname=dbname;host='mercury';port=5432;",,"dbuser","dbpass",);
> ----------------------------------------------------------------------------------------
> 
> think my server name is "8'@@" (or other random junk) on Debian Sarge
> installs (all of mine).
> 
> ----------------------------------------------------------------------------------------
> DBI connect('dbname=dbname;host='mercury';port=5432;','dbuser',...)
> failed: could not connect to server: 8?@@
>         Is the server running on host "mercury" and accepting
>         TCP/IP connections on port 5432?
>  at perl/con line 6
> ----------------------------------------------------------------------------------------

The "8?@@" is not the hostname but the error message. Not that that's
more helpful ...

JFTR: Testing your example on my machine (only changing the hostname, no PG
running, unstable) I get:

DBI connect('dbname=dbname;host='belanna';port=5432;','dbuser',...) failed: could not connect to server: Connection refused
        Is the server running on host "belanna" and accepting
        TCP/IP connections on port 5432?
 at ./test line 6


gregor 
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  infos zur usenet-hierarchie at.*: http://www.usenet.at/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    NP: Alanis Morissette: Head Over Feet

Attachment: signature.asc
Description: Digital signature


Reply to: