[PostgreSQL] EC2에 내부에 구성하기 위한 초기 세팅 명령어

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

[PostgreSQL] EC2에 내부에 구성하기 위한 초기 세팅 명령어

영리치 0 1,770 2022.01.17 18:57
user change :
sudo -i -u postgres
start server
sudo service postgresql start
open sql shell
psql
close sql shell
\q
user change and open shell
sudo -u postgres psql
exit
create user\
sudo -u postgres chreatuser --interactive

create db 
sudo -u postgres createdb linuxhint
in shell : CREATE DATABASE -- create a new database;
in psql
\list or \l: list all databases
\c <db name>: connect to a certain database
\dt: list all tables in the current database using your search_path
\dt *.: list all tables in the current database regardless your search_path

start after boot
sudo update-rc.d postgresql enable

drop db :
DROP DATABASE [IF EXISTS] database_name;

backup and restore 
link
sudo -i -u postgres
pg_dump -F t postgres > poccupy.tar
pg_restore -d postgres2 --clean poccupy.tar

Comments

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Category
실시간 인기글
난 아버지처럼 되지 않을래요
영리치
등록된 글이 없습니다.
Magazine
훈남/훈녀
 
 
 
상점
Facebook Twitter GooglePlus KakaoStory NaverBand