Обсуждение: QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

Поиск
Список
Период
Сортировка

QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

От
NetSuporte
Дата:
I am using PostgreSQL 7.4 on a Linux machine, I have built a small DB
and PqAdmin III and PgAccess both fail when I try to connect, the same
error happens when trying to connect with QT3 I get the error "missing
or erroneous pg-hba.conf file"

I am trying to connect to the localhost using the user that created the
database.

If I use the default values I cannot connect because of Ident error.

How do I configure for access by anyone on the system it is a test
system not for production.

Thanks for any help

Philip



Re: QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

От
John DeSoi
Дата:
On Mar 7, 2005, at 8:59 PM, NetSuporte wrote:

> I am using PostgreSQL 7.4 on a Linux machine, I have built a small DB
> and PqAdmin III and PgAccess both fail when I try to connect, the same
> error happens when trying to connect with QT3 I get the error "missing
> or erroneous pg-hba.conf file"

It seems you need to listen to the error and look at the pg-hpa.conf
file. It should be in the directory with your database. It has detailed
notes and examples in the comments.  If you want to trust all localhost
connections, maybe something like this (from the pg-hba.conf examples):

local   all         all
trust
# IPv4-style local connections:
host    all         all         127.0.0.1         255.255.255.255
trust

If that does not work, post the relevant part of your pg-hba.conf file.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

От
John DeSoi
Дата:
Hi,

Are you certain that PostgreSQL has been started with the -i option.
Something like:

pg_ctl start -D /path/to/data -l /path/to/logfile -o "-i"



On Mar 9, 2005, at 5:56 AM, NetSuporte wrote:

> Thanks john,
>
> It seems one "trust"  had a typo.
>
> now I cannot connect to the server:
>
> ERROR : Error connecting to the server: could not connect to server:
> Is the server running on host "127.0.0.1" and accepting TCP/IP
> connections on port 5432?
>
>
> I have the following configuration:
>
> /etc/services:
>
> snip ...
>
> postgresql      5432/tcp        postgres        # PostgreSQL Database
> postgresql      5432/udp        postgres
>
> postgresql.conf
>
> ...Snip
> # - Connection Settings -
>
> tcpip_socket = true
> #max_connections = 100
>        # note: increasing max_connections costs about 500 bytes of
> shared
>        # memory per connection slot, in addition to costs from
> shared_buffers
>        # and max_locks_per_transaction.
> #superuser_reserved_connections = 2
> port = 5432
>
> Snip ...
>
> pg_hba.conf
>
> snip ...
>
> # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK
> METHOD
> # Database administrative login by UNIX sockets
> local   all         all
> trust
> #
> # All other connections by UNIX sockets
> # local   all         all
> trust
> #
> # All IPv4 connections from localhost
> host    all         all         127.0.0.1         255.255.255.255
> trust
> #
>
>
> What am I missing ?
>
> I  cannot even run psql from the command line anymore?
>
>


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

От
John DeSoi
Дата:
On Mar 9, 2005, at 10:16 AM, NetSuporte wrote:

> Yes and I get the response message "postmaster successfully started"
> but when I look at ps -deaf I cannot find postmaster and I still get
> the same error?
>
> It seems the postmaster dies right after it starts with no message?


Unless you use the -w option, I don't think "postmaster successfully
started" necessarily means what is says :). You need to look in the log
(path you provided for -l) to see where the problem is.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Re: QT3 Designer Pgadmin III and PgAccess Cannot connect to PostgreSQL 7.4 database

От
John DeSoi
Дата:
On Mar 9, 2005, at 12:02 PM, NetSuporte wrote:

> You are correct, here is the problem I inherited with this system and
> it seem there are two different versions of postgresql here. One
> install via the Debian package ( 7.4 ) with a different path than the
> Postgresql directories I was trying to use they seem to be from
> Postgresql ( 8.0.1). I thought I had 7.4 since the psql -V returned
> that value.  Also I found two different paths . One is in
> /usr/local/pgsql ( where the data directory is )  the other in
> /usr/share/postgresql which has some configuration files,
>
> Since this discovery I think it might be best to remove all Postgresql
> files and start over because when I try to run the 7.4 it says that
> the files where created using 8.0.1. This way I won't be having so
> many problems. Also I was told the data was no longer needed so I can
> start over.
>
> Question is which version?

If you are starting over and there are no legacy issues to deal with, I
highly recommend 8.0.1. It is very stable and includes lots of great
new features over 7.4.


John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL