Create database instances

Create database instances

In this section, we will create database instances.

  1. Choose Create database ConnectPrivate
  2. Configure our Database as follows:
  • Choose a database creation method: Standard Create
  • Engine options: MySQL ConnectPrivate
  • Templates: Free tier ConnectPrivate

    We can choose Dev/Test or Production templates to enable Multi-AZ DB instance, which accquire high availability and data redundancy. In this workshop, we will use the Free tier template to save cost.

    ConnectPrivate
  • DB instance identifier: workshop-db-01
  • Master username: admin
  • Credentials management: Self managed
  • Master password: 12345678
  • Confirm master password: 12345678 ConnectPrivate
  • Compute resource: Don’t connect to an EC2 compute resource
  • Network type: IPv4
  • Virtual private cloud (VPC): my-workshop-01
  • DB subnet group: db-subnet-group-01 ConnectPrivate
  • Public access: No
  • VPC security group: Choose existing
  • Existing VPC security groups: database-sg-01
  • Availability zone: us-east-1a ConnectPrivate
  • In Additional configuration, we set initial database name as workshopdb ConnectPrivate
  • Choose Create database and finish the process ConnectPrivate ConnectPrivate
  1. After creating the database, we connect to the database instance by using MySQL Workbench.

    In order to test connection, we need to: Turn on DNS hostnames for our VPC; Enable Publicly Accessible in our RDS Instance; Add a new route with destination 0.0.0.0/0 and target internet gateway in database route table. After testing, we should disable it to ensure security.

  • Move to VPC section, choose our my-workshop-01 VPC and select Edit VPC Settings in Actions tab. ConnectPrivate
  • In DNS settings section, choose Enable DNS hostnames and Save ConnectPrivate
  • Move to RDS section, choose current RDS instance ConnectPrivate
  • Choose Modify ConnectPrivate
  • In Additional Configuration, choose Publicly Accessible ConnectPrivate
  • Choose Continue ConnectPrivate
  • Choose Apply immediately and Modify DB instance ConnectPrivate
  • Now, we can connect to our RDS instance by using MySQL Workbench.
  • Open MySQL Workbench and open a connection to our RDS instance.
    • Connection Name: workshop-db-01
    • Hostname: our endpoint of RDS instance
    • Port: 3306
    • Username: admin
    • Password: 12345678
    • Finally, choose Test Connection ConnectPrivate
  • Our connection should be like this: ConnectPrivate