Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    postgresql with users & password

    Hello All,
    I'm trying to do the following code with Postgresql.
     [thomas@thomas ~]$ createuser -p 5432 -h localhost -D -A -e auth
    And the following is the error that I get.
    createuser: could not connect to database template1: could not connect to server: Connection refused
            Is the server running on host "localhost" and accepting
            TCP/IP connections on port 5432?
    Thanks for the help

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Start the server and try again.

  3. #3

    Have you configured your postgresql server? There are two files where you should make some changes to allow connection.


    /var/lib/pgsql/data/postgresql.conf :
    listen_addresses = '*'
    port = 5432

    /var/lib/pgsql/data/pg_hba.conf :
    local all all trust
    host all all trust

    Those files includes the little how-to and more information you can find from Please read those! Remember restart your postgresql server!

    Then you can create users and databases.. pgadmin is a good tool for handle databases via web browser!

    Good luck!

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts