Re: PostgreSQL - How to login with my Linux user account

Поиск
Список
Период
Сортировка
От Amn Ojee Uw
Тема Re: PostgreSQL - How to login with my Linux user account
Дата
Msg-id 30a777f8-59e0-ae68-4bf3-1715973a6c23@gmail.com
обсуждение исходный текст
Ответ на PostgreSQL - How to login with my Linux user account  (Amn Ojee Uw <amnojeeuw@gmail.com>)
Ответы Re: PostgreSQL - How to login with my Linux user account  (Ron <ronljohnsonjr@gmail.com>)
Re: PostgreSQL - How to login with my Linux user account  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

First of all, my gratitude to Adrian and David for taking the time to reply to my call for help; a 1k  thanks to you kids.

Having stated the above, PostgreSQL provides a default database namely 'postgres'. Taking advantage of this service, I have change the 'psql' statement to 'psql -d postgres -U my_linux_user_name -W', I then entered my Linux account login password and got this error messages :
$ psql -d postgres -U my_linux_user_name -W
Password:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "my_linux_user_name"

I also, using 'postres' account, have created another user account, chispa, who is a superuser; when trying to login as 'chispa' and using the above statement (psql -d postgres -U chispa -W ) PostgreSQL throws the same error message.

What am I doing wrong?
Is there a webpage that explains how to login to PostgreSQL as other than 'postgres'?


Thanks in advance.

On 7/27/23 8:19 p.m., Amn Ojee Uw wrote:
psql -d mydb -U myuser -W

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Compile static postgres.lib for postgres 15.3 on Windows
Следующее
От: Ron
Дата:
Сообщение: Re: password error in batch script