Создаю пользователя и базу данных и не могу подключиться пользователем к этой базе данных. Вот комманды:
postgres@linux:~> createuser -D -A tester
CREATE USER
postgres@linux:~> createdb -O tester testerdb
CREATE DATABASE
postgres@linux:~> psql -U tester testerdb
psql: FATAL: IDENT authentication failed for user "tester"
Если проделать тоже самое но с добавкой пароля результат не меняется (естественно предварительно грохнув базу и юзера):
postgres@linux:~> createuser -P -D -A tester
Enter password for user "tester":
Enter it again:
CREATE USER
postgres@linux:~> createdb -O tester testerdb
CREATE DATABASE
postgres@linux:~> sync
postgres@linux:~> psql -W -U tester testerdb
Password:
psql: FATAL: IDENT authentication failed for user "tester"
-------------------------------------------------------------
Когда я root я ТОЖЕ не могу подключиться ни к одной базе
linux:~ # psql -U postgres
psql: FATAL: IDENT authentication failed for user "postgres"
linux:~ # psql -U postgres template1
psql: FATAL: IDENT authentication failed for user "postgres"
Но выполнив команду su - postgres я затем могу подключиться к любой базе
linux:~ # su - postgres
postgres@linux:~> psql testerdb
Welcome to psql 7.3.4, 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
testerdb=#
-------------------------------------------------------------
Объясните, пожалуйста, что я делаю не так. Что только я ни делал, ... SQL коммандами создавал и базу и пользователя - результат один и тот же!!!!
Спасибо!