I have just installed PostgreSQL on my machine.
psql --version psql
returns (PostgreSQL) 16.2 (Ubuntu 16.2-1.pgdg22.04+1)
I’m trying to create a database but this error is prompted:
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "***" does not exist
I’ve checked for postgresql.service
and it is active.
I have also ran this postgres=# CREATE ROLE ***
but I still get the error.