Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Active reading [<https://en.wikipedia.org/wiki/PostgreSQL> <https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29>].
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 110
  • 134

For my case on Ubuntu 14.04 (Trusty Tahr), installed with PostgreSQL 10.3: I need to follow the following steps

  • su - postgres to switch the user to postgres

  • psql to enter the PostgreSQL shell

  • \password and 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your PostgreSQL service by service postgresql restart

  • Now switch to the postgres user and enter the PostgreSQL shell again. It will prompt you for a password.

For my case on Ubuntu 14.04 (Trusty Tahr), installed with PostgreSQL 10.3: I need to follow the following steps

  • su - postgres to switch the user to postgres

  • psql to enter the PostgreSQL shell

  • \password and 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your PostgreSQL service by service postgresql restart

  • Now switch to postgres user and enter the PostgreSQL shell again. It will prompt you for a password.

For my case on Ubuntu 14.04 (Trusty Tahr), installed with PostgreSQL 10.3: I need to follow the following steps

  • su - postgres to switch the user to postgres

  • psql to enter the PostgreSQL shell

  • \password and 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your PostgreSQL service by service postgresql restart

  • Now switch to the postgres user and enter the PostgreSQL shell again. It will prompt you for a password.

Active reading [<https://en.wikipedia.org/wiki/PostgreSQL> <https://en.wikipedia.org/wiki/PostgreSQL>]. Added some context.
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 110
  • 134

For my case on Ubuntu 14.04Ubuntu 14.04 (Trusty Tahr), installed with postgresPostgreSQL 10.3.: I need to follow the following steps

  • su - postgres to switch the user to postgres

  • psql to enter postgresthe PostgreSQL shell

  • \password and then enter your password

  • \qQ 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your postgresPostgreSQL service by service postgresql restart

  • Now switch to postgres user and enter postgresthe PostgreSQL shell again. It will prompt you withfor a password.

For my case on Ubuntu 14.04 installed with postgres 10.3. I need to follow the following steps

  • 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your postgres service by service postgresql restart

  • Now switch to postgres user and enter postgres shell again. It will prompt you with password.

For my case on Ubuntu 14.04 (Trusty Tahr), installed with PostgreSQL 10.3: I need to follow the following steps

  • su - postgres to switch the user to postgres

  • psql to enter the PostgreSQL shell

  • \password and 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your PostgreSQL service by service postgresql restart

  • Now switch to postgres user and enter the PostgreSQL shell again. It will prompt you for a password.

Source Link
haxpor
  • 2.6k
  • 3
  • 29
  • 47

For my case on Ubuntu 14.04 installed with postgres 10.3. I need to follow the following steps

  • 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.conf) by making sure you have the following line

    local all postgres md5

  • Restart your postgres service by service postgresql restart

  • Now switch to postgres user and enter postgres shell again. It will prompt you with password.

lang-sql

AltStyle によって変換されたページ (->オリジナル) /