How to Create MySQL Database in AWS RDS?
This post contains the following approaches:
- Method 1: Create a MySQL Database with Amazon RDS Using AWS Dashboard
- Method 2: Create a MySQL Database with Amazon RDS Using AWS CLI
Method 1: Create a MySQL Database with Amazon RDS Using AWS Dashboard
To create a MySQL database with RDS, visit the Amazon Management Console to search for RDS service:
Click on the “Create database” button from the RDS dashboard:
Select “Easy create” method of database creation:
Scroll down to opt for the “MySQL” engine:
Choose “Free tier” for the DB instance:
Scroll down the page to provide the “Identifier”, “Username”, and “Password” for the database instance:
Review the configurations before clicking on the “Create database” button:
It will take a few moments to create MySQL Database:
As you can see, MySQL database has been created in AWS RDS:
This was all for creating a MySQL database in RDS using AWS Dashboard. The next section will demonstrate the creation of a MySQL database in RDS using AWS CLI.
Method 2: Create a MySQL Database with Amazon RDS Using AWS CLI
Before starting to create the database, it is required to have the AWS CLI installed on the system:
The version of the AWS CLI has been displayed after the execution of the command:
After that, configure the AWS CLI:
Click here to get the complete AWS Configuration process:
Here is the complete query to create an RDS database using MySQL engine:
Running the above command will display the complete details of the RDS database:
Head back to the Amazon RDS dashboard to verify that the database has been created:
This was all about the creation of the MySQL database in RDS using AWS CLI.
Conclusion
MySQL database in AWS RDS can be created either using AWS Management Console or AWS CLI. To create it using Console, head into the AWS RDS service and configure the settings on the premise. However, to create it using the AWS CLI, install and configure the AWS CLI and write a query mentioned in the post to create the database. This guide has explained both the processes of creating a MySQL database in AWS RDS.
Source: linuxhint.com