pgAdmin으로 접속
postgresql.conf
connection settings 부분에서
listen_address = ‘*’ 로 수정
pg_hba.conf
#IPV4 connection 부분에서 127.0.0.1 이후 부분을 0.0.0.0/0 로 수정. md5 는 유지
postgres 비빌번호 설정
리눅스 bash 창에서 다음을 입력.
sudo -u postgres psql postgres
psql 로 들어 오면 “\password postgres”
이제 sudo -u postgres psql postgres로 psql 접속할 수 있음.
데이터베이스 목록 조회
psql 접속 후 실행 \list 또는 \l
데이터베이스 연결
psql 접속 후 실행 \connect 데이터베이스명 또는 \c 데이터베이스명
role “root” does not exist 란 오류
createuser 명령어를 실행하여 계정을 생성해준다. PostgresSQL 명령어이다.