42.SQL-8

SOWA·2023년 4월 30일
0

SQL

목록 보기
8/12

🧷 AWS RDS (Amazon Relational Database Service)

AWS에서 제공하는 관계형 데이터 베이스 서비스

  • MySQL RDS 접속 터미널 실행
    mysql -h <엔드포인트> -P <포트> -u <마스터 사용자 이름> -p

+사족)
일단 '내 PC->속성->고급 시스템 설정->환경변수'에서 환경변수를 변경해주어야함.
https://dog-developers.tistory.com/21 을 참고하여 환경변수 변경


PS C:\Users\bluer> mysql -h "database-1.~~amazonaws.com" -P 3306 -u do~~ -p
Enter password: *********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 653
Server version: 8.0.32 Source distribution

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database zerobase default character set utf8mb4;
Query OK, 1 row affected (0.15 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| zerobase           |
+--------------------+

ㄴ zerobase라는 이름의 데이터베이스 생성


mysql> create user 'zero'@'%' identified by 'zerobase';
Query OK, 0 rows affected (0.15 sec)

mysql> use mysql
Database changed
mysql> show tables
    -> ;
+------------------------------------------------------+
| Tables_in_mysql                                      |
+------------------------------------------------------+
| columns_priv                                         |
| component                                            |
| db                                                   |
| default_roles                                        |
.
.
.
| time_zone_transition                                 |
| time_zone_transition_type                            |
| user                                                 |
+------------------------------------------------------+


mysql> select user , host from user;
+------------------+-----------+
| user             | host      |
+------------------+-----------+
| dororae          | %         |
| zero             | %         |
| mysql.infoschema | localhost |
| mysql.session    | localhost |
| mysql.sys        | localhost |
| rdsadmin         | localhost |
+------------------+-----------+

ㄴ zero라는 이름의 유저 생성



from.제로베이스 데이터 취업스쿨 강의

0개의 댓글