This article is half-done without your Comment! *** Please share your thoughts via Comment ***
A PostgreSQL Fatal error like role or username does not exist. This is a very common error which is facing by PostgreSQL Users.
Actually, this is happening because of misconfiguration of System username and Database Username.
Most of the Linux users are trying to log in PostgreSQL using root user. But actually, this is wrong.
You will need to become the operating system user under which PostgreSQL was installed to create the first user account.
Generally, the default user name is Postgres and default database is also Postgres.
Once you install PostgreSQL on Linux, you should set the password for the Postgres user which is the default super user of PostgreSQL.
Please do not try to log in with any other default Linux or Unix system user name.
Set password for the default Postgres user:
1 |
sudo passwd postgres |
Create another role using “postgres”:
Creating new role “dbrnd”. -p = set the password and -d = allow to create database.
1 |
sudo -u postgres createuser dbrnd -d -P |