=?iso-8859-1?Q?S=F8ren_Krogh_Neigaard?= <soeren(at)neigaard(dot)com> writes:
> When I issue the command "psql postgres", I get this message:
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Oh, well in that case you seem to not have a server running ... what was
it you saw in ps exactly?
> I found a tutorial that told me to do the following:
> sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
> sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
> sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
> sudo su postgres
> /opt/local/lib/postgresql84/bin/createuser -s -P -l #MYUSER#
That seems to be missing the step of starting the postmaster.
> But still I get the same error when ever I try and run psql. But how
> does postgresql know where to find my database files?
The postmaster should be started by a step along the lines of
sudo su postgres -c '.../postmaster -D /opt/.../defaultdb &'
However, if you're going to use the Macports startup script, it very
probably has got a database location hard-wired into it --- you need to
look at that script and see what it's using, rather than assuming that
that tutorial matches the script. Also, look to see where the script
is sending the postmaster's stderr, and have a look into that logfile
to see if the postmaster is reporting any useful error messages.
regards, tom lane
In response to
pgsql-novice by date
|Next:||From: Bob McConnell||Date: 2010-04-17 19:21:54|
|Subject: Re: Converting a table from SQL Server|
|Previous:||From: Søren Krogh Neigaard||Date: 2010-04-16 18:21:12|
|Subject: Re: Creating a db on my newly installed postresql on OS X |