Thread: psql test error

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    toronto, canada
    Posts
    4
    Rep Power
    0

    Cool psql test error


    Hey there,

    New to this forum, looks like good place to ask this;

    Want to run PostgreSQL on my Mandrake 7.0 Linux box to learn it. Created login account of postgres. When I try this command to get the database going I get this error;
    # psql test
    psql: connectDBStart() -- connect() failed: Connection refused
    Is the postmaster running at 'localhost'
    and accepting connections on Unix socket '5432'?
    createuser: creation of user "tester1" failed

    Any idea what I can do to fix this? I'd really like to learn this database (already been using MySQL). Thanks.
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    toronto, canada
    Posts
    4
    Rep Power
    0

    psql error


    Hi, thanks for the info, but no, I still get the same error. I tried both the PGOPTS="" (there was no commented version but I tried adding this anyway) and -i 5432 to both the
    postmaster.opts.default and postmaster.opts.

    Any other suggestions?
  6. #4
  7. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    toronto, canada
    Posts
    4
    Rep Power
    0

    postres error


    If you mean logging out of the postgres account, going back in and starting # psql test, yes I did.
  10. #6
  11. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    toronto, canada
    Posts
    4
    Rep Power
    0

    psql


    Just so I'm sure what you mean, do you want me to reboot the linux PC that has PostgreSQL on it? Or is there a way to do it while leaving the machine running?
  14. #8
  15. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    You can do it without rebooting, but I don't remember the command (kill or pgsql -start ???) take a look at www.postgresql.org , under the Users area there is a searchable documentation with users comments, please add your too, it could be useful to others.
    Regards
  16. #9
  17. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
    Well, here is the solution for you:

    pg_ctl -- Starts, stops, or restarts postmaster

    pg_ctl start [-w] [-D datadir] [-l filename] [-o options] [-p path]

    pg_ctl stop [-W] [-D datadir] [-m s[mart] | f[ast] | i[mmediate] ]

    pg_ctl restart [-w] [-D datadir] [-m s[mart] | f[ast] | i[mmediate] ] [-o options]

    pg_ctl status [-D datadir]

    Taken from the manual

IMN logo majestic logo threadwatch logo seochat tools logo