Re: first steps - Mailing list pgsql-novice

From Ognjen Blagojevic
Subject Re: first steps
Date
Msg-id 4BC57E52.7030704@etf.bg.ac.rs
Whole thread Raw
In response to first steps  (Donn Washburn <n5xwb@comcast.net>)
List pgsql-novice
Donn Washburn wrote:
> I have looked at the suggestions on  >
> http://www.postgresql.org/docs/8.4/static/
> But I still am confused setting up the permissions and myself as a user.
> I have seen /home/donn/.pgpsql and .pgadmin.  However, I am not sure
> where to start - edit postgres's pg_hba.conf file maybe?
> /usr/bin/postmater is available.  I do have pgadmin3 and it requires a
> pgsql user and password.

For instance, you may want to create new database and new user. First,
swith to postgres user:

   su - postgres

Than open psql

   psql

Than create database

   CREATE DATABASE test_database WITH ENCODING='UTF8';

Then create user

   CREATE USER donn PASSWORD 'changeme';

Then, connect to the database:

   \c test_database

Then, grant privilleges to user donn:

   GRANT ALL ON SCHEMA public TO donn;

Next, try to connect to the specified database with specified user:

   \q
   exit
   psql test_database donn

If that works fine, try connecting to that same database with the same
user using pgAdmin. If both pgAdmin and PostgreSQL are on the same
machine, there is no need to modify pg_hba.conf and postgresql.conf.

Regards,
Ognjen

pgsql-novice by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: PostgreSQL Linux Distro
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: PostgreSQL Linux Distro