윈도우 설치 기준
윈도우에 설치후 원격에서 접속할수 있게
C:\Program Files\PostgreSQL\10\data\pg_hba.conf 파일 열어서 접속 허용아이 대역을 추가한다.
# replication privilege.
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
host all all 0.0.0.0/0 md5 /*여기부분 추가 */
1. 접속 사용자 계정 생성
create user naqsifh password 'test' superuser;
create user naqscom password 'test' superuser;
2. 데이터 베이스 생성
create database naqs;
3. 사용자 권한주기
grant all privileges on database naqs to naqsifh;
grant all privileges on database naqs to naqscom;
4. 생성된 데이터 베이스 확인
\list
5. TABLESPACE 생성
생성할 폴더를 만든다.
c:\postgres_store\ifh_dat
c:\postgres_store\ifh_idx
c:\postgres_store\com_dat
c:\postgres_store\com_idx
create tablespace naqsifh_tbl owner naqsifh location 'c:\postgres_store\ifh_dat';
create tablespace naqsifh_idx owner naqsifh location 'c:\postgres_store\ifh_idx';
create tablespace naqscom_tbl owner naqscom location 'c:\postgres_store\com_dat';
create tablespace naqscom_idx owner naqscom location 'c:\postgres_store\com_idx';
6. schema 생성
create schema naqsifh authorization naqsifh;
create schema naqscom authorization naqscom;
'데이터베이스 > Postgresql' 카테고리의 다른 글
[PostgreSQL] 테이블 정의서 쿼리 (0) | 2021.07.27 |
---|---|
[PostgresSQL] postgresql Block Size (0) | 2021.07.27 |
[PostgreSQL] 원격접속시 오류 발생할때 처리 (0) | 2021.07.26 |
[PostgresSQL] postgresql 백업 및 복원 (0) | 2021.07.21 |
[PostgresSQL] 테이블의 컬럼정보확인 (0) | 2021.07.17 |
댓글