The whole script: #!/usr/bin/perl
use warnings; use strict; use DBI; #my $dbh = DBI->connect ("DBI:Pg:dbname=test2", "postgres", "sonderbar") #my $dbh = DBI->connect ("DBI:Pg:dbname=test2", *host="localhost" ) # or die "Keine Verbindung mit der DB!\n"; my $dbh = DBI->connect("dbi:Pg:database=test2;host=127.0.0.1;port=5432", "postgres") or die $DBI::errstr; But the result is the same, accept for it is a little bit more informativ. DBI connect('database=test2;host=127.0.0.1;port=5432','postgres',...) failed: konnte nicht mit dem Server verbinden: 8tã·øù· Läuft der Server auf dem Host »127.0.0.1« und akzeptiert er TCP/IP-Verbindungen auf Port 5432? at ./postgre_test_1.pl line 11 konnte nicht mit dem Server verbinden: 8tã·øù· Läuft der Server auf dem Host »127.0.0.1« und akzeptiert er TCP/IP-Verbindungen auf Port 5432? Means: could not connect to your server, does it really allow conections over net? I think its really the server. Here comes the pg_hba.conf again: # 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 Gruss Christian -- 10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail +++ GMX - die erste Adresse für Mail, Message, More +++