Skip site navigation (1) Skip section navigation (2)

Re: super beginner setting up postgresql for the first time

From: Benjamin Golder <benjamin(dot)j(dot)golder(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: super beginner setting up postgresql for the first time
Date: 2010-12-24 07:42:12
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
Thanks John and Richard for your help.

I've updated (I thought I needed an older version for some dependency, but I
was wrong) to 9.0

In case anyone else happens to find this and has similar questions, here's a
little synopsis of what it took for me to finish setting up postgresql:

delete any existing postgres users.

make a new user from terminal, outlined
(I added a password and admin group status instead of postgres group status)

Make folders for the new postgres user, just using mkdir in terminal. "
/usr/local/pgsql" and "/usr/local/pgsql/data"

I needed to copy brand new .bash_profile and .bashrc files into the
/usr/local/pgsql directory

then I had to use "su postgres" to login as the postgres account. (not sudo
su postgres)
Then I used source .bash_profile to load the new bash configuration. This is
necessary to ensure that postgres commands are available in the PATH
variable (which I had already set in a different .bash_profile file)

from there I used the
to create a database cluster in
Then I used the chown command discussed on this
give ownership to the postgres user

That finally created the
that Richard mentioned. I did not need to edit this file because the
default authorization value is "trust", meaning that it can be accessed
without a password.

then I could finally run the server, using pg_ctl

Once the server was running I was able to create new superusers (using
createuser <>, a
Terminal command). While making them, no passwords were requested.

Then I could finally go back into the django
app<>I was
making, edit
to include the new superuser, and then run the
syncdb <>command.
This actually prompted me to make a new superuser with a password,
which I did.

The learning curve is steep on these things! I hope this is helpful to
someone else.

2010/12/23 John DeSoi <desoi(at)pgedit(dot)com>

> On Dec 23, 2010, at 12:05 PM, Benjamin Golder wrote:
> > I recently installed postgresql82 with MacPorts but I can't login to
> psql, postgres, or postmaster when I run them from terminal.
> >
> 8.2 is really old. If you are just starting you should be using 9.0. Here
> are a couple of options for Mac installers:
> (Enterprise DB option)
> John DeSoi, Ph.D.

In response to

pgsql-novice by date

Next:From: Jasen BettsDate: 2010-12-25 07:17:04
Subject: Re: Migration from MySQL to PostgreSQL : Datatypes?
Previous:From: Jayadevan MDate: 2010-12-24 03:26:26
Subject: Re: Migration from MySQL to PostgreSQL : Datatypes?

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group