Re: postgresql configuration and set-up
I think the secrets in the /etc/postgresql/pg_hba.conf file.
If your coming from a mysql background, this will seem quite different.
So using your example...
root@thor:su - postgres
postgres@thor:~$ createdb foo
CREATE DATABASE
postgres@thor:~$ createuser foouser
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
CREATE USER
postgres@thor:~$ psql -U foo foouser
psql: FATAL: IDENT authentication failed for user "foo"
--Im guessing this is the error you got?
-- So..
postgres@thor:~$ vi /etc/postgresql/pg_hba.conf
-- Then above all the other entries, till you sort out
-- how you want to use your permissions and security etc
-- put:
-- local foo foouser trust
-- (this assumes you're trying to access from same box)
then...
su -
root@thor:~$ /etc/init.d/postgresql restart
root@thor:~$ psql -U foouser foo
Welcome to psql 7.4.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
foo=#
Best of luck
Glenn
On Wed, 2004-03-17 at 13:30, Tom Allison wrote:
> I'm trying to get debian's postgresql server running on a machine.
>
> But I'm stuck on what the passwords are for the users I create.
>
> createdb foo
> createuser foouser
>
> works just fine.
> But how do I log in to the database foo as user foouser?
> It says I need a password in the docs, But I have no clue what it might
> be, I was never asked for one.
>
Reply to: