본문 바로가기

반응형

IT/postgresql

(4)
postgresql 버전확인, 신규생성 쿼리로 설치된 버전 확인하기 select version() 사용자 생성 create user dev_board password 'dev_board'; 데이터베이스 생성 및 권한 부여 create database boarddb owner dev_board; **참고! 위의 처리는 최초 생성한 postgres 사용자로 로그인해서 처리한다. 콘솔에서 처리하려면 psql 로 로그인해서 처리한다. psql postgres 로 로그인 가능 사용자에게 권한 부여하기 grant all privileges on database boarddb to dev_board; 생성된 데이터베이스 확인 \l 종료하기 \q
PostgreSQL 설치하기 on macOS Ventura13.0.1 퇴직? 을 위하여, 무료 환경을 구축해보고 있습니다. DB 는 PostgreSQL 로 정했습니다! 집에 있는 개발 환경인 macOS 에서 설치해 보았습니다. brew 를 이용합니다. %> brew install postgresql 현재 기준 14 버전이 설치됩니다. 서비스로 등록하여, 리부팅시에 자동으로 실행되게 합니다. %> brew services start postgresql 접속은 psql 명령어로 다음과 같이 합니다. 사용자 확인 \du 를 입력하면 됩니다. postgresql 의 기본포트는 5432 입니다!
php7.2 - postgresql9.6 연계 설치후, 연계시, 오류가 보이지 않는 경우. -> php 설정을 바꾸어, 오류를 확인한다. 소스 상단에 2라인 추가 접속시 indent 오류가 잘못되었다고 나오면, 접속 설정이 잘못되어 있는것. root 로 전환후, postgresql 설정파일을 수정한다. #> vi /var/lib/pgsql/9.6/data/pg_hba.conf # peer 를 password 로 바꾼다 # local all all peer local all all password 추가로, pgadm 같은 외부툴로 접속하려면, 하단에 아래와 같이 추가한다. host all all 0.0.0/0 md5
CentOS7.9 PostGreSQL9.6 설치 1. 레포지터리 업데이트 #> yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm 2. postgresql 설치 #> yum -y install postgresql96 postgresql96-server postgresql96-contrib postgresql96-libs 3. db 초기화 #> /usr/pgsql-9.6/bin/postgresql96-setup initdb 4. 시스템 시작 추가 systemctl start postgresql-9.6 5. 계정추가 copycoding.tistory.com/312 (참조) postgres 계정에서 실행해야..

반응형