psql: permission denied for database “dbname” (“User does not have CONNECT privilege.”) / “unrecognized role option 'connect'”

前端 未结 1 1710
庸人自扰
庸人自扰 2020-12-19 00:57

when I try to login to my database with psql, doing this:

psql dbname --username=qgis --password
>>(prompts for password, entered password)
psql: FATAL         


        
相关标签:
1条回答
  • 2020-12-19 01:31

    You need to grant a privilege. Try this:

    psql dbname
    >> GRANT CONNECT ON DATABASE dbname TO qgis;
    

    I assume you will also need further privileges. PostgreSQL has one of the best documentation pages of all the DBMSs: http://www.postgresql.org/docs/9.0/static/sql-grant.html (You can choose the postgres version you're using at the top of the page).

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