Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- psql: FATAL: Ident authentication failed for user "postgres"
- $ sudo -u postgres psql
- password
- Enter password: ...
- ...
- $ psql -U postgres -h localhost
- /etc/init.d/postgresql reload
- sudo apt-get install pidentd
- sudo service postgresql restart
- # in bash_profile edit PGDATA environmental variable
- open ~/.bash_profile
- # append this line to bash_profile
- export PGDATA="/Library/PostgreSQL/9.3/data"
- # reload bash_profile
- source ~/.bash_profile
- # open pg_hba.conf in vim
- sudo vi /Library/PostgreSQL/9.3/data/pg_hba.conf
- # append these two lines to the end of the pg_hba.conf file
- local all all trust
- host all all 127.0.0.1/32 trust
- # can now login as user in bash
- psql -d <db_name> -U <user_name> -W
- host all all ::1/128 password
- $ psql -U db_user db_name
- psql: FATAL: Peer authentication failed for user "db_user"
- $ export PGHOST=localhost
- $ psql -U db_user db_name
- Password for user mfonline:
- development:
- adapter: postgresql
- encoding: unicode
- database: (appname)_development
- pool: 5
- username: (username you granted appname database priviledges to)
- password:
- local all postgres peer
- Should be
- local all postgres md5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement