To log in without a password:
sudo -u user_name psql db_name
To reset the password if you have forgotten:
ALTER USER user_name WITH PASSWORD 'new_password';
More Related Contents:
- How to change PostgreSQL user password?
- Why the “Group BY” by month didn’t work? [closed]
- Truncating all tables in a Postgres database
- How can I drop all the tables in a PostgreSQL database?
- postgres default timezone
- How to get the count of current month Sunday’s in psql?
- quick random row selection in Postgres
- Restore a postgres backup file using the command line?
- Running PostgreSQL in memory only
- Refresh a materialized view automatically using a rule or notify
- PostgreSQL: Modify OWNER on all tables simultaneously in PostgreSQL
- How do I login and authenticate to Postgresql after a fresh install?
- pgadmin4 : postgresql application server could not be contacted.
- Insert if not exists, else return id in postgresql
- Sequences not affected by transactions?
- Difference between timestamps with/without time zone in PostgreSQL
- Postgres FOR LOOP
- Omitting the double quote to do query on PostgreSQL
- Psql could not connect to server: No such file or directory, 5432 error?
- Strange behaviour in Postgresql
- Postgres: Distinct but only for one column
- Cursor based records in PostgreSQL
- How to add column if not exists on PostgreSQL?
- Maximum characters in labels (table names, columns etc)
- Docker – Postgres and pgAdmin 4 : Connection refused
- Configuration parameter work_mem in PostgreSQL on Linux
- How to work with PGpoint for Geolocation using PostgreSQL?
- PostgreSQL INSERT ON CONFLICT UPDATE (upsert) use all excluded values
- input file appears to be a text format dump. Please use psql
- Hashing a String to a Numeric Value in PostgreSQL