본문 바로가기

카테고리 없음

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: password authentication failed for user "xxx"

https://gabrielinnocentrockerfeller.medium.com/how-to-fix-fatal-password-authentication-failed-for-user-postgres-in-ubuntu-20-4-f7c6d2856fc9

출처:

 

How to Fix FATAL: password authentication failed for user “postgres” in ubuntu 20.4

After a fresh installation of PostgreSQL on my machine, I was frustrated by the fact that it didn’t work seamlessly with my Django…

gabrielinnocentrockerfeller.medium.com

*** 나는 psql -U postgres만으로 연결이 되었다 (위 에러가 난 상황: brew로 postgres를 전부 삭제하고 재설치 후 start) 

 

***하단은 

brew services start postgresql

psql postgres

CREATE DATABASE 데이터베이스이름;

CREATE USER 사용자이름 WITH PASSWORD '비밀번호';

grant all privileges on database <database_name> to <my_username>; ex) grant all privileges on database hdt202 to hdt202admin;