Just installed PostgreSQL 7.2.1 on Debian 3.0. Allthough I believe I've made the neccessary changes to the pg_hba.conf I still get the following message from a remote Web server:

Warning: Unable to connect to PostgreSQL server: connectDB() -- connect() failed: Connection refused Is the postmaster running (with -i) at 'myipaddress' and accepting connections on TCP/IP port '5432'?

Also have installed phpPgAdmin 2.4-1. After creating users, still get 'Wrong username/password. Access denied.' error message.

In fact, at the prompt when I type 'psql mydatabase mydatabaseuser' I get:

psql: could not connect to server: Connection refused
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Almost seems like the users are being ignored. would appreciate the help here.

Thanks in advance.

    Hello,
    first of all you can try command

    ps -axf | grep postmaster to be sure if PostgreSQL is running. Then you should check whether it is started with parameter -i then you have to check pg_hba.conf in the data directory.

    Zdenek

      Thanks,

      you are a Godsend to PGSQL newbies such as I. It was started but not with -i, it is now. That takes care of the remote Web server issue. However, I still have the problems with pgsqlmyadmin and user authentication. Still refuses to log in ;-) I have some busy/tedious/mindless db work to do and I hate doing it through psql prompt. Any suggestions would be greatly appreciated again.

      Thanks again Zdenek!

        Not at all Breticus,
        you can connect to the database as a user named postgres then you can do:

        select from pg_user; and
        select
        from pg_shadow;

        Both of that statements shoud write as one line just the line with your user. If it's not there, you need to create user with command
        createuser on the command prompt or with
        create user on the psql prompt.

        If the user is listed then you have to chech which kind of authentification you are using. It can be checked in pg_hba.conf, it is the last one parameter on row, where you are setting access. You can send me you pg_hba.conf if you want then I can check it for you.

        Zdenek

          • [deleted]

          Might I also suggest that you look at pgadmin as a win32 replacement for phppgadmin?

          it has many more features and is a LOT more reliable than a web interface.

            a month later

            modify /usr/local/pgsql/data/postgresql.conf
            comment out
            ==>line 26
            tcp_socket = true
            ==>line 31
            port=5432
            will ok

              Write a Reply...