Create a Database and a User
NOTE
This doc assumes that you set the local connection for postgres user as trust in pg_hba.conf file.
- SSH into the Postgres Database server.
- Connect to Postgres as the
postgresuser:
shell
psql -U postgres- Create the required user and database with the following SQL commands:
sql
-- Replace <Your Password> with a strong password of your choice
CREATE USER piratedev ENCRYPTED PASSWORD '<Your Password>';
CREATE DATABASE piratedb WITH OWNER=piratedev;- Exit the Postgres shell:
sh
exit