데이터베이스/PostgreSQL

Mac postgresql 설치 dbeaver 사용

왕초보코딩탈출 2021. 8. 9. 09:30

Mac postgresql 설치 dbeaver 사용

postgresql 설치 dbeaver 설치

brew install postgresql

brew install --cask dbeaver-community

Terminal

psql postgres

유저 생성

postgres 라는 유저를 생성하고 비밀번호를 1234로 설정한다.

create user postgres password '1234';

testdb 라는 데이터베이스를 생성하고 encoding utf-8 로 만든다

create database testdb encoding 'utf-8';

testdb owner(주인)를 postgres 설정

alter database testdb owner to postgres;

testdb database에 대한 권한을 postgres

grant all on database testdb to postgres with grant option;