0

I want to add a user and give the createdb permission to it in the PostgreSQL from a Ubuntu command line! I know this can be done by going inside consul and run this:

ALTER USER joe CREATEDB

But I want to do it from Ubuntu command line!

1 Answer 1

1

Use createuser.
While logged in to your server as the postgres OS user:

createuser --createdb joe

Or, if you are some other user with the necessary sudo privileges:

sudo -u postgres createuser --createdb joe

Find more command-line options in the manual or with:

man createuser
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.