Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save onedal/44f894458f210fd6275ee2bfae977be7 to your computer and use it in GitHub Desktop.
Save onedal/44f894458f210fd6275ee2bfae977be7 to your computer and use it in GitHub Desktop.
fixing PG::ConnectionBad: FATAL: password authentication failed for user "postgres"
#go to hb_hba.conf
local all postgres ident
#go to psql
sudo -u postgres psql
#enter the following command to set or change the password
ALTER USER postgres PASSWORD 'actual_password';
#go to hb_hba.conf to change this line back
local all postgres md5
#try to rake db:create or migrate again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment