36

I am unable to create databases using my postgres client with the user I log in as.

I am having trouble figuring out how increase the privileges of my user. I have access to the linux server running postgres and am able to use psql to log on as my user and as the postgres user.

Can someone tell me what commands I should run to allow my user to create databases on my server through the postgres GUI running on a remote host?

Many thanks,

asked Jan 24, 2012 at 14:27

1 Answer 1

72

I don ́t know of a postgres GUI, but here's how to do it in the psql-console (logged in as the superuser):

=> ALTER USER your_username CREATEDB;

See http://www.postgresql.org/docs/current/interactive/sql-alteruser.html for more info.

Philip Couling
15.2k8 gold badges72 silver badges104 bronze badges
answered Jan 24, 2012 at 15:48

4 Comments

You should be able to run this from a SQL window running in the GUI. You will need to be logged in as a super user: postgres is a super user by default.
Not working for me. I got ERROR: permission denied after I ran ALTER USER kbocnezkkamhnt CREATEDB; in the PostgreSQL shell (with sudo).
@Paul: sudo does not affect Postgres-credentials. You are most likely trying to run the command as a normal user.
@bos I don't know how I can run it successfully. I've tried to run GRANT ALL PRIVILEGES ON DATABASE <database_name> TO <user>; and some other commands, but without success.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.