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 can I change a PostgreSQL user password?
- How to reset postgres’ primary key sequence when it falls out of sync?
- PostgreSQL LIKE query performance variations
- How to import CSV file data into a PostgreSQL table
- The forgotten assignment operator “=” and the commonplace “:=”
- Equivalent to unpivot() in PostgreSQL
- Passing user id to PostgreSQL triggers
- Generating a UUID in Postgres for Insert statement?
- Why does PostgreSQL perform sequential scan on indexed column?
- PostgreSQL naming conventions
- In-order sequence generation
- Does not using NULL in PostgreSQL still use a NULL bitmap in the header?
- How to generate the “create table” sql statement for an existing table in postgreSQL
- PostgreSQL: serial vs identity
- Postgres password authentication fails
- Generate series of dates – using date type as input
- Postgres query to check a string is a number
- Using pyspark to connect to PostgreSQL
- Returning from a function with OUT parameter
- ERROR: permission denied for relation tablename on Postgres while trying a SELECT as a readonly user
- How do you create a random string that’s suitable for a session ID in PostgreSQL?
- Joining Results from Two Separate Databases
- PL/pgSQL functions: How to return a normal table with multiple columns using an execute statement
- Update timestamp when row is updated in PostgreSQL
- Postgresql query array of objects in JSONB field
- Multicolumn index on 3 fields with heterogenous data types
- How to add a conditional unique index on PostgreSQL
- Select from a table variable
- Postgres default sort by id – worldship
- Best way to install hstore on multiple schemas in a Postgres database?