Login Failed with Existing User on PostgreSQL

前端 未结 1 624
离开以前
离开以前 2021-02-07 05:07

I just started playing around with PostgreSQL. My goal is to create a new user outside of postgres with all of the same privileges and create a database for my ror app. I\'m abl

相关标签:
1条回答
  • 2021-02-07 05:36

    You are confusing system user with database user. The error message comes from sudo and has nothing to do with PostgreSQL at all.

    To log in as database user Jason:

    psql -U Jason
    

    You need to supply a password, of course, as long as password-less access is not set up. Peer authentication only works for a system user of the same name ("Jason").
    More in the excellent manual about psql here and about authentication methods here.

    0 讨论(0)
提交回复
热议问题