Find the answer to your Linux question:
Results 1 to 3 of 3
Hello All, I'm trying to do the following code with Postgresql. Code: [thomas@thomas ~]$ createuser -p 5432 -h localhost -D -A -e auth And the following is the error that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    5

    postgresql with users & password


    Hello All,
    I'm trying to do the following code with Postgresql.
    Code:
     [thomas@thomas ~]$ createuser -p 5432 -h localhost -D -A -e auth
    And the following is the error that I get.
    Code:
    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
    Location
    home
    Posts
    796
    Start the server and try again.

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4
    Hi,

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

    FC4:

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

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

    Those files includes the little how-to and more information you can find from www.postgresql.org. 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
    $spacer_close

Posting Permissions

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