Updated on 2023-10-19 GMT+08:00

Overview

This practice describes how to install a MySQL database (community edition) on a Huawei Cloud ECS and create a GaussDB(for MySQL) instance, and use DRS to migrate data from MySQL to GaussDB(for MySQL). With DRS, you can perform real-time migration tasks with minimal downtime. Services and databases remain operational during a migration.

Scenarios

  • With the rapid increase of enterprise workloads, traditional databases have poor scalability and require distributed reconstruction.
  • Building traditional databases requires purchasing and installing servers, systems, databases, and other software. Its O&M is expensive and difficult.
  • Traditional databases are poor in complex queries.
  • It is hard for traditional databases to smoothly migrate data without interrupting services.

Prerequisites

  • You have completed real-name authentication.
  • Your account balance is at least $0 USD.

Solution Architecture

In this example, the source database is a MySQL instance on the ECS and the destination database is a GaussDB(for MySQL) instance. Figure 1 shows the deployment architecture when the ECS-hosted MySQL and GaussDB(for MySQL) instances are in the same VPC.

If the ECS-hosted MySQL and GaussDB(for MySQL) instances are not in the same VPC, you need to configure a VPC peering connection between the two VPCs. For details about the deployment architecture, see Figure 2.

Figure 1 Deployment architecture in the same VPC

Figure 2 Deployment architecture in different VPCs

GaussDB(for MySQL) Advantages

  • Robust Performance: GaussDB(for MySQL) decouples storage and compute and uses a "log as database" architecture and remote direct memory access (RDMA) to deliver seven times the performance of open-source MySQL.
  • Elastic Scaling: In addition to a primary node, you can add up to 15 read replicas for a DB instance within minutes. You can also scale up or down CPU and memory specifications for a DB instance as needed.
  • High Reliability: DB instances can be deployed across AZs and there are three data copies under the shared distributed storage layer. A DB instance failover can be complete within seconds with a zero RPO.
  • High Security: With shared distributed storage, GaussDB(for MySQL) ensures zero data loss and service recovery within seconds. VPCs, security groups, SSL connections, and data encryption are used to strictly control secure access.
  • High Compatibility: GaussDB(for MySQL) is fully compatible with MySQL. You can easily migrate your MySQL databases to GaussDB(for MySQL) without reconstructing existing applications and without sharding.
  • Mass Storage: With distributed DFV storage, GaussDB(for MySQL) automatically grows storage as needed, up to 128 TB per DB instance.

Service List

  • Virtual Private Cloud (VPC)
  • Elastic Cloud Server (ECS)
  • GaussDB(for MySQL)
  • Data Replication Service (DRS)

Notes on Usage

The resources and test data in this practice are for demonstration only. Adjust them as needed.

For more information about GaussDB(for MySQL) data migration, see From MySQL to GaussDB(for MySQL).