You can view the databases under a tenant, and create, delete, and modify a database under a tenant.
Prerequisites
To view the database list, make sure that you have the following permissions:
-
Resource Permissions : Cluster Read-only or Tenant Read-only permission -
Menu Permissions : Permission on theDatabase Management menu ofTenants
-
To create, modify, or delete a database, make sure that you have the following permissions:
-
Resource Permissions : Cluster Maintenance or Tenant Maintenance permission -
Menu Permissions : Permission on theDatabase Management menu ofTenants
-
The tenant is a MySQL tenant and a primary tenant.
The root password of the tenant exists in the password box of the current user.
Procedure
Log in to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, select
Tenants . TheTenants page automatically appears.On the
Tenants page, find the target MySQL tenant and click its name to go to theOverview page of the tenant.In the left-side navigation pane, click
Database Management to go to theDatabase Management page.View database information
In the database list, you can view the following database parameters:
Database Name ,Character Set , Collation,Zone Priority ,Disk Usage ,Created At ,Read-only , andJDBC Connection String .Note
If the OceanBase Database version is earlier than V2.2.1, you cannot view the creation time.
Create a database
To create a database, click
New Database in the upper-right corner. In theNew Database panel, configure theDatabase Name ,Character Set , and Collation parameters and specify whether the database is read-only. Then, clickSubmit .Parameter Description Database Name The name of the database. It must start with a letter and contain 2 to 128 characters, including uppercase and lowercase letters, digits, and underscores (_). Character Set The character set of the database. Supported character sets are utf8mb4, binary, gbk, gb18030, latin1, and gb18030_2022. The default character set is gbk. Collation The collation corresponding to the specified character set. Note
- The database automatically inherits the zone priorities of the tenant. For information about how to modify zone priorities, see Modify zone priorities.
- If the zone priorities of the database and tenant are inconsistent, you can click To be consistent with that of the tenant to modify the zone priorities of the database.
Modify database information
You can click
Edit in theActions column of a database to modify the character set, collation, or read-only attribute of the database.Note
- The database automatically inherits the zone priorities of the tenant. For information about how to modify zone priorities, see Modify zone priorities.
- If the zone priorities of the database and tenant are inconsistent, you can click To be consistent with that of the tenant to modify the zone priorities of the database.
Delete a database
To delete a database, click
Delete in theActions column of the database. In the dialog box that appears, enter delete to confirm your operation.Notice
After a database is deleted, the data cannot be recovered. Proceed with caution.