From: raghu ram <raghuchennuru@gmail.com>
To: H S <aras_h1988@yahoo.com>
Cc: admin <pgsql-admin@postgresql.org>
Cc: pesfandiar @ gmail.com <pesfandiar@gmail.com>
Subject: Re: [ADMIN] ▌►connecting to OS user in the same db
Date: Thu, 7 Apr 2011 11:40:52 +0530
Message-ID: <BANLkTi=JZ30F8_S3gqYCyWSM-OY86ddsHw@mail.gmail.com> (raw)
In-Reply-To: <908096.9504.qm@web65905.mail.ac4.yahoo.com>
References: <908096.9504.qm@web65905.mail.ac4.yahoo.com>
On Thu, Apr 7, 2011 at 8:42 AM, H S <aras_h1988@yahoo.com> wrote:
> Hi Sirs,
>
> I would like more than one OS user can access the same DB in the same
> cluster.
>
> For a user like postgres I had these commands:
>
> # adduser postgres
> # mkdir /usr/local/pgsql/data
> # chown postgres /usr/local/pgsql/data
> # su -postgres
> $ ./initdb -D /usr/*/data --> here login as an postgres in terminal
> $ ./postgres -D /usr/*/data --> here login as an postgres in terminal, too.
>
>
> So when I want to access or issue the command :
> /usr/local/pgsql/bin/psql postgres as an another OS user, what should I
> do?!
>
>
>
CREATE USER statement to create and configure a database user,which is an
account through which you can log into the database.
Create the respective OS users inside the database as follows::
psql=# create user test;
and then connect the PostgreSQL database using "test" user as follows::
/usr/local/pgsql/bin/psql -p 5432 -U test -d postgres
--Raghu Ram
SARA
>
>
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: raghuchennuru@gmail.com, aras_h1988@yahoo.com, pesfandiar@gmail.com
Subject: Re: [ADMIN] ▌►connecting to OS user in the same db
In-Reply-To: <BANLkTi=JZ30F8_S3gqYCyWSM-OY86ddsHw@mail.gmail.com>
References: <908096.9504.qm@web65905.mail.ac4.yahoo.com> <BANLkTi=JZ30F8_S3gqYCyWSM-OY86ddsHw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox