Postgres Default Password
The answer is easy there isn t a default password.
Postgres default password. So you can try login with postgres user. So in order to add a password for default users in postgresql we need to first log in and connect as the postgres user. Version 11 12 i have tested. Assuming you re on the typical unix linux system you didn t say sudo u postgres psql.
Login as a default user in almost all systems the standard postgres user is postgres and they do not need a password at all for verification. According to some posts there is no default password set for the postgres user yet i can t connect using an empty password string. On most unix and linux distributions the default authentication mode is set to ident which means a given unix user x can only connect as the postgres user x. Password authentication failed for user postgres.
Su postgres to switch user to postgres psql to enter postgres shell password then enter your password q to quit the shell session then you switch back to root by executing exit and configure your pg hba conf mine is at etc postgresql 10 main pg hba. I m receiving this exception when i try to connect. Restart your postgres service by service. Issuing the command.
Initially the only postgres user is postgres so. Cat var lib pgsql 9 3 data pg hba conf you ll see the authentication mode is ident. By default the user is postgres and the password is the one which you enter while installing the database.