Self-managed databases on Elastic Compute Service (ECS) instances are databases that are installed and configured on ECS instances. You can use Data Management Service (DMS) to manage self-managed databases on ECS instances. This topic describes how to use DMS to add and manage self-managed databases on ECS instances. In the example, a MySQL database is used.
Prerequisites
- DMS is activated. For more information, see DMS.
- An ECS instance of a memory-optimized r-series instance family is created. For more information about how to create an ECS instance, see Create an instance by using the wizard.
- An inbound rule is added to the security group of the ECS instance to allow traffic for the MySQL database on the listening port. The default listening port number for the MySQL database is 3306.
- A MySQL database is installed on the ECS instance. For more information, see Database overview.
- A non-root account is created for the MySQL database on the ECS instance.
Note By default, MySQL databases do not allow remote access from the root account. If you have changed the default settings to allow remote access from the root account, skip this step.In this example, run the following command to create an account named
dms
for logging on to the MySQL database, set the password toEcs123!
, and grant all permissions to the account:create user 'dms'@'%' IDENTIFIED BY 'Ecs123!'; grant all privileges on *.* to 'dms'@'%' with grant option; flush privileges;
Background information
DMS is a database management web terminal provided by Alibaba Cloud to help manage self-managed databases on ECS instances that run Windows or Linux. You can add self-managed databases in the DMS console to use data management features such as creating databases and tables. DMS supports self-managed MySQL, SQL Server, PostgreSQL, MongoDB, and Redis databases. For more information, see DMS documentation.
Procedure
What to do next
After you log on to the database, you can perform operations on the database by using SQL statements or the DMS console.