-
Mac M1 Postgres installation using home brew&명령어 표로 정리BackEnd★★★/DB데이터베이스 2022. 1. 6. 23:07728x90
📱https://www.youtube.com/watch?v=fGOsgMcTP2I
pgAdmin4 postgresql 다 설치 후 -> spotlight에서 실행해서 하면됨 DBserver실행 할 수 있음 Terminal에서 명령어 brew reinstall postgresql brew services start postgresql Server 시작 pg_ctl -D /opt/homebrew/var/postgres start Server 시작 pg_ctl -D /opt/homebrew/var/postgres stop Stop psql postgres postgres 터미널 시작 Postgres 안에서 명령어 (postgres =# ) \? psql commands에 대한 도움말이 나옴 \du list roles(roles들을 출력함) CREATE ROLE escuela_user WITH LOGIN PASSWORD 'escuela_password'; escuela_user 아이디를 만들고
사용자를 생성함.\du escuela_user 라는 사용자가 생성된 것을 확인가능 ALTER ROLE escuela_user CREATEDB; escuela_user 에게 Role를 만들어줌 \du escuela_user 에게 Role를 만들어진 것을 확인 가능 \q Postgres 명령어를 종료함 다시 Terminal로 와서 psql postgres -U escuela_user 만든 계정으로 잘 들어가는지 확인 가능함 다시 postgres terminal 안으로 들어옴 \l 데이터베이스를 나열함. CREATE DATABASE escuela_database; 만든 계정의 데이터베이스를 만들어줌 \l 만든 계정의 데이터베이스가 잘 만들어졌는지 확인함. 이제 spotlight에서 "pgAdmin4" 실행해서 서버 시작하면 됨
postgresql du를 이용해서 유저 확인을 해 봅시다.
postgresql에서 유저 정보를 출력하는 방법을 알아봅시다. postgresql을 깔았습니다. 어떻게 접속하면 될까요? psql을 치면, postgres에 접속합니다. 그런데, role "cho"가 존재하지 않는다고 뜹니다. role
codingdog.tistory.com
다른글 보기
macOS-홈브류Homebrew란?
맥북엔 홈브루 최고 !
이거 모르면 개불편 ㅜㅜ 못 살아 ㅋ -
https://economiceco.tistory.com/m/12618macOS-홈브류Homebrew란? 맥북엔 홈브루 최고 ! 이거 모르면 개불편 ㅜㅜ 못 살아 ㅋ
https://www.44bits.io/ko/keyword/homebrew#%ED%99%88%EB%B8%8C%EB%A5%98-%EC%BA%90%EC%8A%A4%ED%81%ACcask 홈브류(Homebrew)란? 홈브류(Homebrew)는 맥스 호웰(Max Howell)이 주도해서 개발한 맥OS, 리눅스 용..
economiceco.tistory.com
반응형'BackEnd★★★ > DB데이터베이스' 카테고리의 다른 글
Rust❤️How to connect to a Postgres DB in Rust to create and retrieve a row storing it into a Rust struct (0) 2022.08.13 Rust❤️Neon: Serverless Postgres. (0) 2022.07.27 brew upgrade 하고 나온 postgresql 메세지 연구하자 ㅜㅜ (0) 2022.02.28 Build A Fast Rest API With ACTIX, POSTGRESQL AND DIESEL- Security Union (0) 2022.01.14 Learn PostgreSQL Tutorial - Full Course for Beginners-freeCodeCamp.org (0) 2022.01.07 윈도우서버에서 PostgreSQL 외부 접속 가능하게 설정하는 방법- (0) 2022.01.06 PostgreSQL What to do if you forgot a password? (0) 2022.01.05 Rust to PostgreSQL Database with SQLX -Rust Lang Tutorial 2021 (0) 2021.12.14