PostgreSQL

공부의 기록·2021년 12월 2일
0

Node.JS

목록 보기
18/32
post-thumbnail

텍스트

설치

PostgreSQL 을 설치하면 GUI 프로그램인 pgAdmin4 등의 추천 플러그인 설치를 제공한다.
특별한 이유가 없으면 설치를 하도록 하자.
Learn PostgreSQL Tutorial - Full Course for Beginners

ROLE and POWER

PostgreSQL Shell 로 ROLE 을 추가하고 역할을 주는 등의 설정을 할 수 있다.

참고 포스트는 다음과 같다.
https://sujinisacat.tistory.com/6

  1. PostgreSQL Shell 켜서 로그인

  2. \du; 로 ROLE 확인

  1. CREATE USER userName WITH PASSWORD 'userPassword'; 로 ROLE 생성
    3.1.아이디와 비밀번호에 대문자를 쓰지 말자..!

  2. ALTER ROLE username CREATEDB REPLICATION; 으로 ROLENAME 에 ROLE 부여

  3. pgAdmin 에서 확인 : ok

에러

Unable to connec to server

절차대로 설치하고 DB 생성을 위해 pgAdmin4 를 실행하면,
사전에 등록한 비밀번호를 입력하는 창이 나온다.

각각 DB, postgreSQL 비밀번호를 입력하면 갑자기 다음과 같은 에러 메세지가 뜬다.

Unable to connect to server: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

구글링을 해보니 최상단에 StackOverflow 게시글이 있었다.
https://stackoverflow.com/questions/40532399/unable-to-connect-to-server-for-postgres

해당 게시글의 리플에도 있듯, postgreSQL 이 꺼져있다고 하는 게시글을 봤다.

I Love you, VDAHAN !!!!

postgres shell 에서 확인 : ok

pgAdmin4 에서 확인 : ok

More

Learn PostgreSQL Tutorial - Full Course for Beginners - 4:19:33

영상 길이가 너무 긴 것으로 보아,
내용도 너무 많을 것 같아서 별도로 시리즈를 만들어서 필기를 하면서 공부를 해야겠다.

참고로, 해당 영상은 PostgreSQL 을 Command Line Level 에서 다루는 내용이다.
DB PostgreSQL

profile
2022년 12월 9일 부터 노션 페이지에서 작성을 이어가고 있습니다.

0개의 댓글