From: | Akbar <melinda_sayang(at)hotpop(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | password authentication always failed |
Date: | 2005-01-20 09:10:17 |
Message-ID: | 1106212217.10828.3.camel@tux.akbarhome |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi,
I have superuser named postgres and normal user named garfield.
Then I do this in command prompt :
$ su postgres
$ initdb -D /usr/local/pgsql/proj -U garfield
$ psql -U garfield -f mydb.sql template1
$ psql -U garfield mydb
Ok, everything is fine.... I can connect to database and do some
operation.
Note: mydb.sql was created with this command before:
$ pg_dump -u -C -f mydb.sql mydb
Then I changed the pg_hba.conf in /usr/local/pgsql/proj from :
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
to
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
Then I restarted database. When I do this command:
$ psql -U garfield mydb
password:
It always failed with error:
FATAL: password authentication failed for user "garfield"
psql: FATAL: password authentication failed for user "garfield"
I have done this as postgres to make sure that password is correct:
# ALTER USER garfield PASSWORD 'garfield' CREATEDB;
What is wrong? garfield can create database but not another user.
Could that be problem?????
Thank you.
Regards,
Akbar
From | Date | Subject | |
---|---|---|---|
Next Message | Akbar | 2005-01-20 10:11:16 | grant all the database object automatically |
Previous Message | Marcin Gil | 2005-01-20 07:35:34 | 7.4.x to 8.0 upgrade process |