Re: Pg 7.3.1 & DBD::Pg 1.21
От | codeWarrior |
---|---|
Тема | Re: Pg 7.3.1 & DBD::Pg 1.21 |
Дата | |
Msg-id | b0pqtj$54p$1@news.hub.org обсуждение исходный текст |
Ответ на | Re: Pg 7.3.1 & DBD::Pg 1.21 (Renê Salomão <rene@ibiz.com.br>) |
Список | pgsql-general |
That's a different error than the first pg_hba.conf... Sounds like a pgoptions.conf dilemmna -- It TCP/IP enabled ? Did you start postgres with TCP/IP enabled ? "Ren� Salom�o" <rene@ibiz.com.br> wrote in message news:20030123165709.356e2f0b.rene@ibiz.com.br... > Tom lane, > =20 > I've restarted Pg before, that's why still received the error message... N= > ow that I've stopped and started it again the following message appears...= > =20 > > DBI connect('dbname=3Dslave;host=3D164.35.10.17;port=3D5432','username=3Dpg= > sql',...) failed: could not connect to server: Connection refused at pg_con= > nect.pl line 16 > > Is there any compatible problem with Pg and DBD::Pg? What am I doing wrong= > ? =3Do) > > Thanks... > > On Thu, 23 Jan 2003 12:58:51 -0500 > Tom Lane <tgl@sss.pgh.pa.us> wrote: > > > =3D?ISO-8859-1?Q?Ren=3DEA_Salom=3DE3o?=3D <rene@ibiz.com.br> writes: > > > I was trying to connect to Pg 7.3.1 using perl and DBD::Pg 1.21, howev= > er the following error occurs:=20 > > > $ perl pg_connect.pl=20 > > > FATAL: No pg_hba.conf entry for host 164.35.10.17, user pgsql, databas= > e slave > >=20 > > The error message is pretty specific. Are you sure you edited the right > > pg_hba.conf? Did you SIGHUP the postmaster after you edited it? > >=20 > > regards, tom lane > >=20 > > Thanks. > -----------------------------=20 > Ren=EA Salom=E3o > Ibiz Tecnologia -- www.ibiz.com.br > > > $ psql -l -p 5432=20=20=20=20=20=20 > List of databases > Name | Owner=20 > -----------+------- > slave | pgsql > template0 | pgsql > template1 | pgsql > (3 rows) > > Vers=E3o: > [pgsql@slave:5432]#select version(); > -[ RECORD 1 ]-------------------------------------------------------- > version | PostgreSQL 7.3.1 on i586-pc-linux-gnu, compiled by GCC 2.96 > > PG_HBA.CONF: > # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD > > local all all trust > host all all 127.0.0.1 255.255.255.255 trust > host all all 164.35.10.17 255.255.255.0 trust > > Vers=E3o: > $ perl -e 'use DBI; print "$DBI::VERSION\n"' --> 1.32 > $ perl -e 'use DBD::Pg; print "$DBD::Pg::VERSION\n";' --> 1.21 > > > Fun=E7=E3o Perl: > #!/usr/bin/perl > > use DBI; > use DBD::Pg; > use strict; > > my $dbh; > > my $dbname=3D'slave'; > my $host=3D'164.35.10.17'; > my $port=3D'5432'; > my $options=3D''; > my $username=3D'pgsql'; > my $password=3D'pgsql'; > > $dbh =3D DBI->connect("dbi:Pg:dbname=3D$dbname;host=3D$host;port=3D$port", > "$username", > "$password", > { RaiseError =3D> 1, AutoCommit =3D> 0 }) || die $DBI::errstr; > > print "Connected!!!\n"; > > my $hSt =3D $dbh->prepare('SELECT * FROM table;'); > > $hSt->execute; > > while(my @raD =3D $hSt->fetchrow_array()) { print "$raD[0]\t$raD[1]\n";} > > $hSt->finish; > > $dbh->disconnect; > > print "Disconnected!!!\n"; > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly
В списке pgsql-general по дате отправления: