Below you will find pages that utilize the taxonomy term “PostgreSQL”
Postsread more
Postgres Creating new User & Database
One thing i regularly look up is how to create a new Postgres User & DB. So here are the two ways to create a User and Database.
The CLI Way
Postgres has many helpful Utilities for some common operations.
Like for creating a User (the -P
will Prompt for a Password):
1sudo -u postgres createuser -P gitea
And creating a Database with assigned permissions:
1sudo -u postgres createdb --owner gitea gitea_db
You can add --echo
to those commands to see the actual SQL that is send to the Database.