setting up default user for postgres db access

Barry L. Kline blkline at attglobal.net
Tue May 31 03:18:53 UTC 2005


bruce wrote:
> hi...
> 
> (already posted to the postgres list)
> 
> i have a postgres setup with an actual user. i can do a 'psql -Ugforge' and
> give the password, and get into the app..
> 
> the problem i'm having is that i can't get into postrges as the default/root
> user...
> 

You can't get in because "root" isn't a postgresql user.

from a command line as root, do:

su - postgres -c "createuser root"

and follow the prompts.

If you want root to have a database then:

su - postgres -c "createdb -Oroot root"

That should do the trick.

BK




More information about the fedora-list mailing list