December 3rd, 2001, 10:31 PM
psql test error
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.
December 4th, 2001, 03:44 AM
SEARCH before posting
The answer was in this post psql start error just 3 posts away from yours.
If it doesn't fit, then feel free to ask.
December 4th, 2001, 10:40 PM
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?
December 5th, 2001, 03:48 AM
Maybe a stupid question, but ...
Did you restart Postgresql, in order to make it read the new configuration?
December 5th, 2001, 09:21 PM
If you mean logging out of the postgres account, going back in and starting # psql test, yes I did.
December 6th, 2001, 03:24 AM
No, I mean restarting the whole postgresql server.
December 7th, 2001, 09:53 PM
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?
December 9th, 2001, 10:36 AM
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.
December 10th, 2001, 04:20 AM
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