클라우드 DBMS

클라우드DBMS 이용하기 (postgresql)

클라우드DBMS  postgresql 메뉴얼 입니다.  

 

클라우드DBMS의   PostgreSQL 은 10.15 버젼으로 제공됩니다.  ( 2020-12-09일 기준)  

 

 

PostgreSQL 클라이언트 설치


 

PostgreSQL 클라이언트는  yum install postgresql  로 설치 가능합니다.   

  yum 설치시 낮은 버전의 클라이언트가 설치 될 경우 아래 메뉴얼을 따라 10 버젼으로 설치 가능합니다.  

 

PostgreSQL 레포리지 추가  

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm

 

PostgreSQL 10 버전  클라이언트 설치  

yum install postgresql10

 

 

PostgreSQL 접속하기


신청시 발송된 이메일에 있는 접속정보를 입력하여 관리계정인  postgres 로 접속 합니다.  

psql -h 신청도메인.sldb.iwinv.net -U postgres -W

 

 

기타 명령어

 

 

패스워드 변경

ALTER USER 유져명 with password 'newpassword';

ex)

 

 유저 생성 

CREATE USER 유저명 PASSWORD '패스워드';

 

 

 Database 생성 

CREATE DATABASE name

               [ [ WITH ] [ OWNER [=] user_name ]

               [ TEMPLATE [=] template ]

               [ ENCODING [=] encoding ]

               [ LC_COLLATE [=] lc_collate ]

               [ LC_CTYPE [=] lc_ctype ]

               [ TABLESPACE [=] tablespace_name ]

               [ ALLOW_CONNECTIONS [=] allowconn ]

               [ CONNECTION LIMIT [=] connlimit ]

               [ IS_TEMPLATE [=] istemplate ] ]

;

ex) 

 

 

DB 선택  

\c  DB DBuser