-
Open terminal and execute to use postgres user
sudo -i -u postgres
Note that the terminal now is ->postgres@user:~$
-
Create a database executing the command
createdb mydatabasename
-
Create an user executing the command
createuser user -P
this is going to ask a password -
Assign postgres role to the local db user executing the following command in
psql
console: