Introduction
AWS offers three significant types of Database Engines: MySQL, PostgreSQL, and Oracle.
MySQL:
- Type: Relational Database Management System (RDBMS)
- Description: MySQL is an open-source relational database known for its speed, reliability, and ease of use. It’s widely used for web applications and is popular with small—to medium-sized enterprises.
- Features: Supports ACID transactions, high availability with replication, strong data security, scalability, and a large ecosystem of tools and community support.
PostgreSQL:
- Type: Object-Relational Database Management System (ORDBMS)
- Description: PostgreSQL is an open-source, highly stable, and extensible database known for its advanced features and standards compliance. It is designed to handle a wide range of workloads, from single machines to data warehouses or web services with many concurrent users.
- Features: Advanced SQL compliance, support for JSON and XML data types, full ACID compliance, complex queries, foreign keys, triggers, views, transactional integrity, and Multi-Version Concurrency Control (MVCC).
Oracle:
- Type: Relational Database Management System (RDBMS)
- Description: Oracle Database is a multi-model database management system produced and marketed by Oracle Corporation. It is known for its strong performance, reliability, and enterprise-grade features, making it suitable for large-scale, mission-critical applications.
- Features: Advanced security features, high availability, robust data management capabilities, advanced analytics, support for multiple data models, and comprehensive support for both on-premises and cloud environments.
This article only discusses the steps for provisioning MySQL.
Prerequisites
- You need an account with AWS (Amazon Web Services). Click here to open one.
- You need to install MySQL on your local machine. Use this documentation to do it. Make sure you select what is appropriate for the OS (Operating System) you are using for your computer.
Steps to Provision MySQL (RDS)
- Sign in to AWS Management Console.
- Navigate to RDS.
Click on “Create database”.
Choose “Standard Create” and then select “MySQL” as the engine.
Choose a version (e.g., MySQL 8.0.36) and template (e.g., Free Tier).
Configure settings as desired (DB instance identifier, master username, and password).
We use the defaults for Storage type, as shown above. If Storage autoscaling is required, you can also enable it.
For Connectivity, you will have to configure the following:
- Compute resource: choose the Don’t connect to an EC2 computer resource option.
- Network type: select IPv4 to assign an IPv4 address to the database.
- Virtual private cloud (VPC): select the desired VPC to deploy your database.
Choose the desired subnet for the DB subnet group where the database will reside.
Also, under Public access, select Yes to allow access to the database.
Then, attach the correct VPC security group (firewall) or create a new one, ensuring the appropriate port is open to allow connectivity to the instance.
Leave the Availability Zone as default, and it will choose any AZ that is available in your network.
Next, configure the Database authentication. Click Password authentication will enable you to assign a password for access to the database.
You can also Enable Enhanced Monitoring if desired.
Leave the rest as defaults and click Create database.
You will have to wait until the database is completely provisioned.
Finally, you can access your data from the CLI using the following command:
mysql --host=<replace_this_with_your_ENDPOINT> --port=3306 --user=<your_username> --password=<your_password>
Replace the following with the correct info:
- <replace_this_with_your_ENDPOINT> with your database Endpoint.
- <your_username> with your correct username.
- <your_password> with your secure password.
Conclusion
Use the steps outlined above to provision other databases that require different Engines. Examples are MariaDB, Oracle, PostgreSQL, Microsoft SQL, and IBM Db2. The approach will vary, but the concepts for provisioning any of them are standard here on AWS. Have fun!