Re: Application trying to use wrong user when logging into the database

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Application trying to use wrong user when logging into the database
Дата
Msg-id 20210329094759.GB18510@depesz.com
обсуждение исходный текст
Ответ на Application trying to use wrong user when logging into the database  (Simon Connah <simon.n.connah@protonmail.com>)
Ответы Re: Application trying to use wrong user when logging into the database  (Simon Connah <simon.n.connah@protonmail.com>)
Список pgsql-novice
On Sun, Mar 28, 2021 at 01:44:59PM +0000, Simon Connah wrote:
> https://github.com/vitaly-t/pg-promise/wiki/Connection-Syntax#configuration-object
>
> and have all the right data supplied. But instead of using my
> applications role which I created in PostgreSQL it is trying to use my
> Linux user name "simon" and is failing authentication because of it.
> I'm just confused at the moment. At no point in time have I created
> a role called "simon" and I have never tried to connect to any of my
> databases using the role name "simon", so why is it trying to
> authenticate as "simon"?

Pg will try to connect as db user simon if you don't provide username to
log in as.

For example, if I'm logged in shell as depesz, and will try: psql -d xx,
it will try to login to db xx as user depesz.

To login as user "magic", I have to provide it expliticly: psql -U magic
-d xx.

Please show us your connection code from your app.

Best regards,

depesz




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

Предыдущее
От: Bzzzz
Дата:
Сообщение: Re: Application trying to use wrong user when logging into the database
Следующее
От: Simon Connah
Дата:
Сообщение: Re: Application trying to use wrong user when logging into the database