gcloud 명령어를 이용하여 PostgreSQL을 만들어보자

  • AnneBullock
    (AnneBullock)
  • AnneBullock's Avatar 이 글의 작성자
  • Offline
  • Newbie
  • Newbie
더보기
07 Jan 2022 15:23 - 07 Jan 2022 19:41 #5456 작성자: AnneBullock
AnneBullock 님의 글: gcloud 명령어를 이용하여 PostgreSQL을 만들어보자
INSTANCE_NAME=postgres-instance
DATABASE_NAME=mydatabase
REGION=us-central1
gcloud sql instances create $INSTANCE_NAME \
  --database-version POSTGRES_12 \
  --tier db-g1-small \
  --region $REGION
gcloud sql databases create $DATABASE_NAME \
  --instance $INSTANCE_NAME
cat /dev/urandom | LC_ALL=C tr -dc '[:alpha:]'| fold -w 50 | head -n1 > dbpassword
gcloud sql users create <사용자이름> \
   --instance=$INSTANCE_NAME --password=$(cat dbpassword)
Time to create page: 0.045 seconds
Powered by Kunena Forum