Re: psql -c "select * from a-user-name-that-exist fails
От | lalebarde |
---|---|
Тема | Re: psql -c "select * from a-user-name-that-exist fails |
Дата | |
Msg-id | 1285320938237-2852359.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: psql -c "select * from a-user-name-that-exist fails (Josh Kupershmidt <schmiddy@gmail.com>) |
Ответы |
Re: psql -c "select * from a-user-name-that-exist fails
Re: psql -c "select * from a-user-name-that-exist fails |
Список | pgsql-novice |
Hi Josh, Thanks for your help. I have recreated the user laurent with : $ createuser -S -d -l -P -E -U postgres laurent from the postgres linux user. From the documentation, I should be able to login since LOGIN is default for createuser and for the case, I force it with -l. But I just cannot login : $ createdb -U laurent mydb -W Mot de passe : createdb : n'a pas pu se connecter à la base de données postgres : n'a pas pu se connecter au serveur : Permission non accordée Le serveur est-il actif localement et accepte-t-il les connexions sur la socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ? Which translate to : createdb: could not connect to database postgres: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? I am in the pg_user view : postgres=# SELECT usename FROM pg_user; usename ---------- postgres laurent (2 lignes) and the pg_role one : postgres=# SELECT rolname FROM pg_roles; rolname ---------- postgres laurent (2 lignes) My pg_hba.conf is not a showstopper : local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust Now for your checks : postgres=# SELECT rolcanlogin FROM pg_authid WHERE rolname = 'laurent'; rolcanlogin ------------- t (1 ligne) So it looks ok, isn't it ? -- View this message in context: http://postgresql.1045698.n5.nabble.com/psql-c-select-from-a-user-name-that-exist-fails-tp2852042p2852359.html Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
В списке pgsql-novice по дате отправления: