Skip to main content
Commonmark migration
Source Link

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

 

You can't. However, you can reset it to something else. To do this, you

 
  1. Edit pg_hba.conf to allow trust authorization temporarily - go here for its location
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

 

You can't. However, you can reset it to something else. To do this, you

 
  1. Edit pg_hba.conf to allow trust authorization temporarily - go here for its location
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily - go here for its location
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily - go here for its location
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily - go here for its location
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again
filled out the SQL, added link to the documentation, added code formatting and fixed slightly broken link
Source Link

I lost the database password. What can I do to recover it? From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE / PASSWORD to set the new password
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again
  1. Edit pg_hba.conf to allow trust authorization temporarily
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE / PASSWORD to set the new password
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again

From the 9.0 FAQ, I lost the database password. What can I do to recover it?:

I lost the database password. What can I do to recover it?

You can't. However, you can reset it to something else. To do this, you

  1. Edit pg_hba.conf to allow trust authorization temporarily
  2. Reload the config file (pg_ctl reload)
  3. Connect and issue ALTER ROLE postgres WITH PASSWORD 'newpassword'; to set the new password (for first time users note the semi-colon)
  4. Edit pg_hba.conf again and restore the previous settings
  5. Reload the config file again
deleted 330 characters in body
Source Link
Milen A. Radev
  • 1.6k
  • 14
  • 13
Loading
"trust" is at the end of the line, not the file
Source Link
user1822
user1822
Loading
added a quote from the link, to provide more value on the answer
Source Link
Loading
Post Undeleted by JNK
Post Deleted by JNK
Source Link
Milen A. Radev
  • 1.6k
  • 14
  • 13
Loading