Next problem getting PostgreSQL to work

markpatterson

Registered
I've been following through this page: http://developer.apple.com/internet/opensource/postgres.html to install PostgreSQL on my eMac, but after solving one problem on this forum, I've come encountered another.

When I try to execute 2 commands, the results are different from what that page suggests. I get this:
Code:
[B]Pattersons-eMac:/usr/local/pgsql postgres$[/B] /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/pg_ctl: line 341: logfile: Permission denied
postmaster successfully started
[B]Pattersons-eMac:/usr/local/pgsql postgres$[/B] createdb test
createdb: could not connect to database template1: 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"?
[B]Pattersons-eMac:/usr/local/pgsql postgres$[/B]

Can anyone see what is going wrong?
 
Thanks, I've now got it work. I had a look at Marc Liyange's site. I had a more recent version of PostgreSQL installed anyway, so I tried to work out what was different in his approach. The main that that seemed different is that the apple page
says:
Code:
chown postgres /usr/local/pgsql/data
whereas Marc says
Code:
sudo chown -R postgres /usr/local/pgsql/
.
 
markpatterson said:
Thanks, I've now got it work. I had a look at Marc Liyange's site. I had a more recent version of PostgreSQL installed anyway, so I tried to work out what was different in his approach. The main that that seemed different is that the apple page
says:
Code:
chown postgres /usr/local/pgsql/data
whereas Marc says
Code:
sudo chown -R postgres /usr/local/pgsql/
.

The difference is the -R allows chown to go through the whole pgsql directory and change the owner to postgres. Without the -R it just does the top level directory. If you already knew that forgive me.

calliex
 
Back
Top