This topic describes the database management operations for tenants in MySQL-compatible mode, including logging in to a database, creating a database, and managing accounts.
Background information
You can log in to a database to perform operations such as database object management, data import and export, SQL editing and execution, PL compilation and debugging, data and structure processing, execution analysis, and database maintenance. For more information, see Overview of SQL Console. By managing accounts in a database, you can configure different access privileges for each account based on business requirements.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target cluster instance and click its name to enter the instance workspace.
In the left-side navigation pane, click Tenants.
In the tenant management list, click the target tenant to go to the MySQL Tenant Workspace page.
In the left-side navigation pane, click Databases. On the Databases page, you can connect to a database, connect to the SQL console, and create a database. For details, see Connect to a database and Create a database (MySQL only).
In the database management list, you can view information such as the database name, character set, status, bound accounts, and used disk space.
Click the More icon in the Actions column and select Manage Account to grant database privileges to the corresponding account.
DDL privileges: SHOW DATABASES, SHOW VIEW, CREATE, CREATE VIEW, DROP, INDEX, ALTER
DML privileges: SELECT, DELETE, INSERT, UPDATE
Read-only privilege: SELECT
Read and write privilege: ALL
Note
If an account is granted a specific privilege (for example, read and write privilege), and you log in to the corresponding database with that account and then switch the privilege on the console (for example, to read-only privilege), you must reconnect for the new privilege to take effect.
Click the More icon after the Actions column and select Delete to delete the target database.