xxxxxxxxxx
# by meanstackbasit basit khan
sudo -i -u postgres psql #login into Postgress
\l #check the list of DB
dropdb 'database name' #database drop command
sudo -u postgres psql -c 'create database test;' #create new DB via command
# add User credentials via blow commands
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;