shell - How to add a user to PostgreSQL from the Ubuntu command line? -


i want add user , give createdb permission in postgresql ubuntu command line! know can done going inside consul , run this:

alter user joe createdb 

but want ubuntu command line!

use createuser.
while logged in server postgres os user:

createuser --createdb joe 

or, if other user necessary sudo privileges:

sudo -u postgres createuser --createdb joe 

find more command-line options in manual or with:

man createuser 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -