You can create, modify, or delete databases in the Data Management (DMS) console in a visualized manner without the need to execute SQL statements.
Prerequisites
You are a DMS administrator, a database administrator (DBA), or a regular user such as the owner of an instance. For more information, see System roles.
Manage MySQL databases
DMS allows you to manage MySQL databases, MariaDB databases, and AnalyticDB for MySQL databases. For more information about the supported database types, see the Supported database types section of the "Supported database types and features" topic.
- Log on to the DMS console V5.0.
In the left-side instance list of the homepage, right-click the instance that you want to manage and select Database management.
Perform the following operations based on your business requirements:
Create a database
Click Create DB.
In the Create database dialog box, configure the Database Name, Character set, and Validation rules parameters.
NoteIf an instance is managed in Security Collaboration mode, you must configure a security rule that allows the CREATE DATABASE command to be executed. For more information, see SQL Correct.
Click OK.
Modify a database
On the Database management page, find the database that you want to manage and click Edit in the Operation column. In the Edit Database dialog box, modify the Character set or Validation rules parameter for the database.
Delete a database
On the Database management page, find the database that you want to manage and click Delete in the Operation column. In the message that appears, click Confirm.
NoteIf an instance is managed in Secure Collaboration mode, you must configure a security rule that allows the DROP DATABASE command to be executed. For more information, see SQL Correct.
Manage MongoDB databases
- Log on to the DMS console V5.0.
In the left-side instance list of the homepage, right-click the instance that you want to manage and select Database management.
Perform the following operations based on your business requirements:
Create a database
Click Create DB.
In the Create database dialog box, configure the Database Name and Collection Name parameters.
NoteA collection is created when the database is created. You can configure the Collection Name parameter to specify the collection name. If you leave the Collection Name parameter empty, a collection named test is created by default.
Click OK.
Delete a database
On the Database management page, find the database that you want to manage and click Delete in the Operation column. In the message that appears, click Confirm.
Manage PostgreSQL databases
DMS allows you to manage PostgreSQL databases and AnalyticDB for PostgreSQL databases.
You can also manage the schemas of a PostgreSQL database.
- Log on to the DMS console V5.0.
In the left-side instance list of the homepage, right-click the instance that you want to manage and select Database management.
To manage the schemas of a PostgreSQL database, click the instance that you want to manage in the left-side instance list of the homepage. Right-click the database that you want to manage and select Mode Management.
Perform the following operations based on your business requirements:
Manage databases
Create a database
Click Create DB.
In the Create database dialog box, configure the following parameters: Database Name, Connection Limit, Table Space, Character set, and Remarks.
NoteThe following section describes some of the parameters.
Connection Limit: the maximum number of concurrent connections to the database. Default value: -1, which indicates that the database can be accessed without a limited number of concurrent connections.
Table Space: the tablespace of the database. Default value: default tablespace.
For more information, visit the PostgreSQL official website.
Click OK.
Modify a database
On the Database management page, find the database that you want to manage and click Edit in the Operation column. In the Edit Database dialog box, modify the parameters of the database, such as Connection Limit and Table Space.
Delete a database
On the Database management page, find the database that you want to manage and click Delete in the Operation column. In the message that appears, click Confirm.
Manage schemas
Create a schema for a database
On the Mode Management page, click Create Schema.
In the dialog box that appears, configure the Schema Name, Owner, and Remarks parameters.
NoteBy default, the owner of a schema is the user who creates the schema.
Click OK.
Modify a schema of a database
On the Mode Management page, find the schema that you want to manage and click Edit in the Operation column. In the Edit Schema dialog box, modify the Schema Name, Owner, and Remarks parameters.
Delete a schema of a database
On the Mode Management page, find the schema that you want to manage and click Delete in the Operation column. In the message that appears, click Confirm.
What to do next
You can also create an account for a database and grant the account specific permissions on the database. For more information, see the topics under Account permission management.
DMS provides the account management feature only for MySQL, PostgreSQL, and MongoDB databases. For databases of other engines, go to the corresponding console to manage the database accounts.