13

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

psql dbname --username=qgis --password >>(prompts for password, entered password) psql: FATAL: permission denied for database "gisdatabase" DETAIL: User does not have CONNECT privilege. 

I've searched around on Google for information on this simple issue but haven't found anyone directly talking about this.

I've tried doing this:

psql dbname >>ALTER ROLE qgis WITH CONNECT; 

But got this error:

ERROR: unrecognized role option "connect" 
0

1 Answer 1

16

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).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.