Updated on 2022-11-14 GMT+08:00

Creating an RDS for MySQL Instance

Create an RDS for MySQL instance and test data.

Creating an RDS for MySQL Instance

  1. Log in to the management console.
  2. Click in the upper left corner and select AP-Singapore.
  3. Click the service list icon on the left and choose Databases > Relational Database Service.
  4. Click Buy DB Instance.
  5. Configure the instance name and basic information.

  6. Select an instance class.

  7. Select a VPC and security group and configure the database port.

    The VPC and security group have been created in Creating a VPC and Security Group.

  8. Set the instance password.

  9. Click Next and complete the whole process.
  10. Return to the instance list.

    If the instance status becomes Available, the instance is created.

Creating Test Data

  1. Log in to the management console.
  2. Click in the upper left corner and select AP-Singapore.
  3. Click the service list icon on the left and choose Databases > Relational Database Service.
  4. Locate the created RDS instance and choose More > Log In.
  5. In the displayed dialog box, enter the username and password of the instance and click Test Connection.
  6. After the connection is successful, click Log In.
  7. Click Create Database to create the db_test database.

  8. Run the following SQL statement in db_test to create table table3_:

    CREATE TABLE `db_test`.`table3_` (
    	`Column1` INT(11) UNSIGNED NOT NULL,
    	`Column2` TIME NULL,
    	`Column3` CHAR NULL,
    	PRIMARY KEY (`Column1`)
    )	ENGINE = InnoDB
    	DEFAULT CHARACTER SET = utf8mb4
    	COLLATE = utf8mb4_general_ci;

  9. Run the following statements in table table3_ to insert three lines of data:

    INSERT INTO `db_test`.`table3_` (`Column1`,`Column2`,`Column3`) VALUES(1,'00:00:11','a');
    INSERT INTO `db_test`.`table3_` (`Column1`,`Column2`,`Column3`) VALUES(2,'00:00:22','b');
    INSERT INTO `db_test`.`table3_` (`Column1`,`Column2`,`Column3`) VALUES(5,'00:00:55','e');