Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

specifying a username for a DB

Status
Not open for further replies.

blues77

Programmer
Jun 11, 2002
230
CA
Hi,
I'm very new to postgreSQL and i need to know how to specify the username and passwd for a database that i've already created. any help is greatly appreciated!!

Mike
 
this is for redhat 7.x
log in as root
go to the command promt(or console as you call it)
type service postgresql start
there should be a confirmation saying that service started
type su postgres
then type createuser somename
there will be a question saying
"should user be allowed to create/drop databases?"
type y
then create a database by typing
createdb dbname
then type
psql template1
then type grant all privileges on dbname to somename

that should be all

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top