AWS에서 제공하는 관계형 데이터 베이스 서비스
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라는 이름의 유저 생성