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 DATABASEUSERCIDR-ADDRESS METHOD
---
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
what command are you using to start up postgreSQL?
Oh yes, this is an entry-script in init.d:
#!/bin/bash
. /usr/share/postgresql-common/init.d-functions
VERSION=8.1
case $1 in
start)
start $VERSION
;;
stop)
stop $VERSION
;;
restart)
I tried this:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=127.0.01;port=5432,
postgres) or die $DBI:errstr;
test2 is the name of the database.
and got this:
Global symbol $DBI requires explicit package name at ./postgre_test_1.pl
line12.
syntax error at ./postgre_test_1.pl line 12, near
I'm not being wise here, but did you do
use DBI;
at the top of your script?
Hardy Merrill
Christian Stalp [EMAIL PROTECTED] 1/23/2006 11:57 AM
I tried this:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=127.0.01;port=5432,
postgres) or die $DBI:errstr;
test2 is the name of the
Christian Stalp wrote:
I tried this:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=127.0.01;port=5432,
postgres) or die $DBI:errstr;
test2 is the name of the database.
and got this:
Global symbol $DBI requires explicit package name at ./postgre_test_1.pl
line12.
syntax error at
Christian Stalp [mailto:[EMAIL PROTECTED] wrote:
I tried this:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=127.0.01;port=5432,
postgres) or die $DBI:errstr;
^^^
$DBI::errstr, not $DBI:errstr. Note how the error messages call your
attention to this error:
Ronald J Kimball wrote:
Christian Stalp [mailto:[EMAIL PROTECTED] wrote:
I tried this:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=127.0.01;port=5432,
postgres) or die $DBI:errstr;
^^^
$DBI::errstr, not $DBI:errstr. Note how the error messages call
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 =
Christian Stalp wrote:
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 =
Christian,
what is the result of this:
netstat -an | grep 5432
nothing ;-) The server does not here on the net. But with pure DBI, can i
do it without IP? For the first connection I mean? I mean with an
UNIX-Socket or however DBI connects to a local server?
Gruss Christian
--
Have you got
tcpip_socket = true
in postgresql.conf?
Yea, exactly. This is funny. I allready tried this. See:
venus:/home/chris# pg_ctlcluster 8.1 main restart
The PostgreSQL server failed to start. Please check the log output:
FATAL: unbekannter Konfigurationsparameter »tcpip_connections«
Christian Stalp wrote:
Christian,
what is the result of this:
netstat -an | grep 5432
nothing ;-) The server does not here on the net. But with pure DBI, can i
do it without IP? For the first connection I mean? I mean with an
UNIX-Socket or however DBI connects to a local server?
Gruss
Christian Stalp wrote:
Christian,
what is the result of this:
netstat -an | grep 5432
nothing ;-) The server does not here on the net. But with pure DBI, can i
do it without IP? For the first connection I mean? I mean with an
UNIX-Socket or however DBI connects to a local server?
Gruss
Christian,
THIS WILL WORK:
my $dbh = DBI-connect(dbi:Pg:database=test2;host=/tmp;port=5432,
postgres, ) or die $DBI:errstr;
Christian
--- Ursprüngliche Nachricht ---
Von: Louis Gonzales [EMAIL PROTECTED]
An: Louis Gonzales [EMAIL PROTECTED]
Kopie: Christian Stalp [EMAIL PROTECTED], dbi-users@perl.org
Betreff: Re: PostgreSQL trouble
Datum: Mon, 23 Jan 2006 13:28:00 -0500
Christian,
THIS WILL WORK:
my $dbh = DBI
Christian Stalp wrote:
Have you got
tcpip_socket = true
in postgresql.conf?
Yea, exactly. This is funny. I allready tried this. See:
venus:/home/chris# pg_ctlcluster 8.1 main restart
The PostgreSQL server failed to start. Please check the log output:
FATAL: unbekannter
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
18 matches
Mail list logo