목록IT/DB (2)
BIBI BLOG
postgre 접속 방법 터미널에서 postgreSQL 서비스 시작 brew services start postgresql postgreSQL 콘솔 접속하기 psql postgres postgreSQL 콘솔 나가기 \q 터미널에서 postgreSQL 서비스 종료 brew services stop postgresql 신규 유저 생성 postgres=# create user scott; CREATE ROLE postgres=# \du List of roles Role name | Attributes | Member of -----------+------------------------------------------------------------+----------- admin | Superuser, Cr..
설치 명령어 brew install postgresql 버전확인 postgres --version postgre 실행/종료 명령어 # postgresql 서비스 실행 명령어 brew services start postgresql # postgresql 서비스 종료 명령어 brew services stop postgresql # postgresql 콘솔 접속 명령어 psql postgres # postgresql 콘솔 종료 명령어 \q PostgreSQL 유저 superuser 권한, 롤 부여 psql 접속 후 유저 권한(롤) 확인 \du 비밀번호 번경 ALTER USER admin PASSWORD 'mynewpassword';