Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- tbls
- Node
- nodejs
- api 문서
- JavaScript
- API design
- php
- ScrollBooster
- 몽고DB
- nginx
- NVM
- PGSQL
- 데이터베이스
- Stoplight
- 우분투
- node.js
- db
- ubuntu
- 스크롤부스터
- Linux
- 엔진엑스
- nosql
- 리눅스
- php7
- ulimit
- 18.04
- MongoDB
- 접속자수
- Redis
- PostgreSQL
Archives
- Today
- Total
Parallel World
Postgresql 유저생성 및 데이터베이스 생성하기 본문
Postgresql 유저 생성
Postresql 유저 생성
$ sudo -u postgres createuser <username>
Postgresql 유저 로그인
$ sudo su - postgres
Postgresql 환경에 진입
$ psql
psql (11.5 (Ubuntu 11.5-1.pgdg18.04+1))
Type "help" for help.
postgres=#
유저 패스워드 지정
postgres=# alter user <username> with encrypted password '<password>';
데이터베이스 전체 권한 부여
postgres=# grant all privileges on database <dbname> to <username> ;
데이터베이스 생성하기
데이터베이스 생성
postgres=# CREATE DATABASE <dbname>;
데이터베이스 리스트 확인
postgres=# \list
데이터베이스 삭제
postgres=# DROP DATABASE <dbname>;
'프로그래밍 > Linux' 카테고리의 다른 글
Postgresql ROLE 백업 및 복구 (0) | 2019.10.01 |
---|---|
Ubuntu18.04 - nvm 및 nodejs 최신버전설치 (0) | 2019.09.09 |
Ubuntu 18.04 - Postgresql 설치 (0) | 2019.09.06 |
Ubuntu 18.04, Ubuntu 20.04 - PHP 8 설치 (0) | 2019.09.06 |
Ubuntu 18.04, Ubuntu 20.04 Nginx 설치 (0) | 2019.09.06 |