Here’s how to correctly install and configure PostgreSQL.
First update the system
Then install the packages:
Create Database and User
Now let’s create a PostgreSQL roles and databases.
PostgreSQL uses the concept of roles to distinguish the variety of users that can connect to a database. After a fresh install, the default PostgreSQL user is actual named “postgres”.
Login into the “postgres” user using
and add a user
set the password for the specified USERNAME.
Now create a database and assign the user to it
Connect to the database using
And that’s it.