brunch
매거진 NCP

(정식)Lab3. Cloud DB 생성

by Master Seo

<1> Cloud DB for MySQL 생성

<2> 사용자 추가 , DB 추가 ,ACG추가

<3> Windows server 로그인



<1> Cloud DB for MySQL 생성


Cloud DB for MySQL 생성


public Subnet에 생성


edu

edu


topasvga

%

go1002!

sa




2

private 도메인 확인


db-36lvu5.vpc-cdb.ntruss.com





<2> 사용자 추가 , DB 추가 ,ACG추가



1

DB관리 > DB user 관리

ncpuser

%

DDL

goo10!



2

# DB Server 상세 보기

Database 관리


application



3

# DB ACG 허용

# Server > ACG


10.0.0.0/16 3306

myip 3306



#

mysql -u ncpuser -p -h db-36lvu5.vpc-cdb.ntruss.com

Enter password: xxxxxxxxxxxx


mysql -u ncpuser -p -h db-36lvu5.vpc-cdb.ntruss.com < /var/www/html/dbstep3.sql



mysql -u ncpuser -p -h db-36lvu5.vpc-cdb.ntruss.com


MySQL [(none)]> use application;

MySQL [application]> show tables;



MySQL [application]> select * from cfr;


MySQL [application]> select * from cfr;

+----+----------------+---------------------+-----------+

| no | remote_ip | timestamp | filename |

+----+----------------+---------------------+-----------+

| 2 | 211.249.70.113 | 2021-04-06 11:32:26 | hyoju.jpg |

| 3 | 211.249.40.20 | 2021-04-06 11:32:43 | |

| 4 | 211.249.70.113 | 2021-04-28 10:59:52 | a1.jpg |

+----+----------------+---------------------+-----------+




4

/var/www/html/dbconnect.php

/var/www/html/key.php




vi /var/www/html/dbconnect.php

private domain입력


db-36lvu5.vpc-cdb.ntruss.com




5

vi /var/www/html/key.php

access-key , secret-key 입력

// My page - 인증키 관리



6

/var/www/html/dbconnect.php

username = topasvga

passwd = go100!





7

mysql -u ncpuser -p -h db-36lvu5.vpc-cdb.ntruss.com < /var/www/html/dbstep3.sql




8

user application;


show tables;






<3> Windows server 로그인


mstsc


administrator



https://brunch.co.kr/@topasvga/4850


keyword
매거진의 이전글(정식)Lab2. 리눅스 서버 만들기