psql create database
snippet in sql

create postgres database

user5517

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;

psql create database

user596

CREATE DATABASE dbname;

create database with template

user8585

CREATE DATABASE [Database to create]
WITH TEMPLATE [Database to copy]
OWNER [Your username];

create database postgres

user863

createdb -h localhost -p 5432 -U postgres testdb
password ******