Manage databases

2025-03-28 08:05:55  Updated

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 the Database Management menu of Tenants
  • 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 the Database Management menu of Tenants
  • 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

  1. Log in to the OceanBase Cloud Platform (OCP) console.

  2. In the left-side navigation pane, select Tenants . The Tenants page automatically appears.

  3. On the Tenants page, find the target MySQL tenant and click its name to go to the Overview page of the tenant.

  4. In the left-side navigation pane, click Database Management to go to the Database 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 , and JDBC 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 the New Database panel, configure the Database Name , Character Set , and Collation parameters and specify whether the database is read-only. Then, click Submit .

      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 the Actions 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 the Actions 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.

Contact Us