postgres 설치 사용

x·2023년 5월 17일
0

postgresql

목록 보기
2/3

brew search postgresql 버전 검색
brew install postgresql or brew install postgresql@x 특정 버전 설치
postgres -V 버전 확인
brew services list 목록 확인
brew services restart postgresql@14 postgres 실행
psql postgres 접속
\du role list
create database x db 생성
create user {username} with encrypted password '{password}'; 유저 생성
\list db 목록
\dt 테이블 목록
connect {db} db 연결

datagrip에서 db 만들고 콘솔에서 생성

create user root with password 'root';
alter role root set client_encoding to 'utf-8';
alter role root set timezone to 'Asia/Seoul';
grant all privileges on database xxx to root;

0개의 댓글