All Products
Search
Document Center

Cloud Backup:Preparations

Last Updated:Sep 27, 2025

You can use Cloud Backup to back up MySQL databases that are deployed on Elastic Compute Service (ECS) instances or on your on-premises servers. You can also restore these databases as needed. This topic describes the preparations that you must make before you back up a MySQL database.

Step 1: Confirmation and acquisition

  1. Install Cloud Assistant Agent on the ECS instance that hosts the database. This step is required if the database that you want to back up is deployed on an ECS instance.

    The Cloud Backup client for ECS requires Cloud Assistant. For ECS instances purchased before December 1, 2017, you must manually install the Cloud Assistant client.

  2. Obtain the username and password that you use to log on to the MySQL database.

Step 2: Create a backup account and grant permissions

If you do not have a dedicated backup account, contact an administrator to create one. The backup user requires the following minimum permissions: SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION SLAVE, REPLICATION CLIENT, SUPER. If the database version is MySQL 8.0 or later, you must also grant the BACKUP_ADMIN permission. The REPLICATION SLAVE permission is required for continuous log backup tasks.

The following steps describe how to create a backup user named backupadmin.

  1. Log on to your MySQL database.

    mysql -u root -p

    After you run the command, enter the database password when prompted.

  2. Create a backup account named backupadmin.

    CREATE USER 'backupadmin' IDENTIFIED BY 'password';
  3. Grant permissions to the backup account.

    Grant the required access permissions to the backup user. In this example, *.* indicates all databases and tables. You can specify databases and tables as needed.

    GRANT SELECT,RELOAD,PROCESS,LOCK TABLES,REPLICATION SLAVE,REPLICATION CLIENT,SUPER ON *.* TO 'backupadmin'@'%' ;
  4. Refresh the permissions.

    After you grant the permissions, you must refresh the permissions for them to take effect immediately.

    FLUSH PRIVILEGES;

What to do next

Register an ECS-hosted MySQL database or Register an on-premises MySQL database.