06. Cloud SQL for MySQL
2024. 11. 14. 07:55ㆍ클라우드/GCP
Task 1. Create a Cloud SQL instance
gcloud sql operations list --instance=myinstance
작업상태 확인
Task 2. Connect to your instance using the mysql client in Cloud Shell
gcloud sql connect myinstance --user=root
Task 3. Create a database and upload data
CREATE DATABASE guestbook;
USE guestbook;
CREATE TABLE entries (guestName VARCHAR(255), content VARCHAR(255),
entryID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(entryID));
INSERT INTO entries (guestName, content) values ("first guest", "I got here!");
INSERT INTO entries (guestName, content) values ("second guest", "Me too!");
SELECT * FROM entries;
반응형
'클라우드 > GCP' 카테고리의 다른 글
08. Service Accounts and Roles: Fundamentals (0) | 2024.11.16 |
---|---|
07. Cloud Shell and gcloud (0) | 2024.11.15 |
05. Cloud IAM (0) | 2024.11.13 |
04. VPC Networking Fundamentals (0) | 2024.11.12 |
03. Cloud Storage (0) | 2024.11.11 |