I tried this:
my $dbh = DBI->connect ("DBI:Pg:dbname=test2", *host="localhost" )
and got this:
Name "main::host" used only once: possible typo at ./postgre_test_1.pl line
9.
DBI connect('dbname=test2','*main::localhost',...) failed: konnte nicht mit
demServer verbinden: øÿø·xü·
        Läuft der Server lokal und akzeptiert er Verbindungen
        auf dem Unix-Domain-Socket »/var/run/postgresql/.s.PGSQL.5432«?
 at ./postgre_test_1.pl line 9
Keine Verbindung mit der DB!
 Which means: could not connect to server. Does the server runs local and
does it accepts connections on UNINX-DOMAIN_Socket >>/var... rest you can
see. 

My Linux is Debian 3.1 Sarge but the PostgreSQL-Server is a Backport. You
know about backports? www.backport.org

[EMAIL PROTECTED]:~/perl/dbi$ uname -a
Linux venus 2.6.14.5 #1 PREEMPT Sun Jan 8 23:30:58 CET 2006 i686 GNU/Linux

Gruss Christian

> --- Ursprüngliche Nachricht ---
> Von: Louis Gonzales <[EMAIL PROTECTED]>
> An: Christian Stalp <[EMAIL PROTECTED]>
> Betreff: Re: PostgreSQL trouble
> Datum: Mon, 23 Jan 2006 11:04:35 -0500
> 
> Have you tried adding (  dbname="test";*host=____  ) where host = either 
> 127.0.0.1 OR localhost*
> just try that before you go any further. 
> 
> Which version of Linux are you running?  Send me the results of:
> uname -a
> 
> what command are you using to start up postgreSQL?
> 
> 
> Christian Stalp wrote:
> 
> >Dear Lois,
> >thank you for your help.
> >And sorry for forgotten my "pg_hba.conf", that is really important.
> >Here it comes:
> ># Database administrative login by UNIX sockets
> >local   all         postgres                          ident sameuser
> >
> ># TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
> >#host   all     all
> ># "local" is for Unix domain socket connections only
> >local   all         all                               ident sameuser
> ># IPv4 local connections:
> >host    all         all         127.0.0.1       255.255.255.255         
> >trust
> ># IPv6 local connections:
> >host    all         all         ::1/128               md5
> >
> >I called this script from my home-dir under Linux. It worked allready
> with
> >PostgreSQL 7.5 but not with 8.1 and the postgre-datebase-cluster.
> >
> >Gruss Christian
> >
> >
> >  
> >
> >>Christian,
> >>What does your "pg_hba.conf" file look like?  If you haven't made any 
> >>changes in there, for where/who/how is allowed to connect to this 
> >>postgreSQL db instance, it's possible that's the first place to start.  
> >>Second, it looks like in your connect string, you haven't identified a 
> >>host to connect to.
> >>
> >>("DBI:Pg:dbname=test2;host=HOSTNAME;port=PORT_IF_OTHER_THAN_5432", 
> >>"postgres"... seems correct)
> >>
> >>Those would be the first two places to check.  Let me know how:
> >>1) you have/have not configured the pg_hba.conf file
> >>2) from where is script executing from?  (remote - TCP socket -, local 
> >>UNIX/Windows file socket)
> >>
> >>            Regards,
> >>
> >>    
> >>
> >
> >
> >  
> >
> 
> 

-- 
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie

Reply via email to