sajad torkamani

The createdb command requires that the executing user has the privilege to create new databases. The default postgres superuser should have this privilege so you might want to run sudo su - postgres before the subsequent commands.

Create database and make executing user its owner

createdb <database>

Create database with specific owner

createdb <database> -O <some-postgres-user>


Tagged: Postgres