Updated on 2024-11-07 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.

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 with no downtime.

Prerequisites

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

Solution Architecture

In this practice, the source database is a ECS-hosted MySQL instance 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). It can deliver seven times the performance of open-source MySQL for certain service loads.
  • 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.
  • Mass storage: Based on Huawei-developed data functions virtualization (DFV) distributed storage, GaussDB(for MySQL) supports up to 128 TB of storage.

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).