CS/postgresql

[PostgreSql - trouble shooting] - 유저 password 초기화

sliver__ 2022. 3. 17. 16:55
728x90
  • Environment
    • Window Ubuntu 
    • Window에도 postgresql설치가 되어있고 Ubuntu에도 postgresql이 설치되어있다.
    • Window가 기본 OS이기 때문에 booting될 때 자동으로 postgresql이 살면서 port 5432번을 할당받는다.
    • Ubuntu를 시작할 때 이미 port 5432번이 binding이 되어 있으므로 postgresql 서비스가 시작이 안된다.
    • /etc/init.d/postgresql restart 로 서비스를 강제로 시작해주어야 한다...(5433 port로 binding 됨)

 

 

  • python으로 db를 연동하려했는데 postgres user의 password를 까먹음
  • postgres db로 접속 후, alter user postgres with password '{변경할 비밀번호}' 로 수정

 

728x90