54
Mam problem z połączeniem się z moim własnym postgres db na lokalnym serwerze. google jakieś podobne problemy i podszedł z tym ręcznym https://help.ubuntu.com/stable/serverguide/postgresql.htmlPostgreSQL: rola nie może się logować
tak:
pg_hba.conf
mówi:
# TYPE DATABASE USER 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 md5
# IPv6 local connections:
host all all ::1/128 trust
następnie utworzyć użytkownika i przypisać hasło dla niego:
postgres=# create role asunotest;
CREATE ROLE
postgres=# alter role asunotest with encrypted password '1234';
ALTER ROLE
ale mnie nie wpuszcza:
-bash-4.2$ psql -h 127.0.0.1 -U asunotest
Password for user asunotest: 1234
psql: FATAL: role "asunotest" is not permitted to log in
jaki może być problem?
Ponieważ nie mogę 'psql', jak mogę ALTER rola? –
@ RomulusUrakagiTs'ai powinieneś wpisać jako postgres użytkownika (sudo -u postgres psql postgres) –