RDS is one of Amazon services that can be used to create database.
To create database and connect it to your code. You should follow the steps bellow:
- Open your AWS management cosole.
- In All Services option you will find Database.Click on RDS.
- Click on create database
```
app.config['MYSQL_DATABASE_HOST'] = 'endpoint of the database from RDS'
app.config['MYSQL_DATABASE_USER'] = 'username of the database from RDS'
app.config['MYSQL_DATABASE_PASSWORD'] = 'Password of the database from RDS'
app.config['MYSQL_DATABASE_DB'] = 'name of the of the database from RDS'
```
- Go to terminal and enter the followings:
export PATH=$PATH:/usr/local/mysql/bin mysql -h <endpoint> -P 3306 -u <username> -p
- Click eneter Then termianl will ask you to enter password. Enter your DB password.
- Enter your mysql code (e.g. create tabel)
```
show databases;
use yourdatabase name;
CREATE TABLE users(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name varchar(20) UNIQUE NOT NULL,email varchar(30),
password TEXT NOT NULL);
```