After a sandbox instance is created, you can access it with ease by using Elastic Compute Service (ECS).
Prerequisites
A Database Backup (DBS) sandbox instance is created. For more information, see Use the emergency recovery feature for a self-managed MySQL database.
- An ECS instance is created. It must reside in the same virtual private cloud (VPC) as the DBS sandbox instance. For more information, see Create an instance by using the wizard.Note For information about how to change the VPC of an ECS instance, see Change the VPC of an ECS instance.
- A MySQL database is deployed on the ECS instance. For more information, see MySQL official documentation.
Procedure
In the following example, an ECS instance that runs 64-bit CentOS 7.6 is used.
- Obtain the sandbox instance address.
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules. In the upper-left corner of the Backup Schedules page, select a region.
- Find the backup schedule that is associated with the sandbox instance that you want to access. Then, click Manage in the Operation column.
- In the left-side navigation pane, click Sandbox Instance Tasks. On the page that appears, find the sandbox instance that you want to access and obtain the sandbox instance address in the Sandbox instance/remote disk address column.
- On the ECS instance, run the following command to connect to the database:
mysql -h <sandbox instance address> -u <username> -p<password>
Note- The sandbox instance address does not contain a port number. Spaces are not allowed between the
-p
option and the password. - The username and password of the sandbox instance are the same as those of the source database.
When an output similar to the following one is returned, the ECS instance is connected to the sandbox instance. - The sandbox instance address does not contain a port number. Spaces are not allowed between the