Re: [ADMIN] ▌►connecting to OS user in the same db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Thu, Apr 7, 2011 at 8:42 AM, H S <aras_h1988@xxxxxxxxx> 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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux