This topic describes the privilege types supported by OceanBase Database in MySQL mode.
Privilege types
OceanBase Database supports the following three levels of privileges in MySQL mode:
Administrator privileges: the privileges to manage a tenant, such as modifying system settings and accessing all tables in the tenant.
Database privileges: the privileges to manage all objects in a database, such as creating or deleting tables in the database, and accessing those tables.
Object privileges: the privileges to manage a specific object, such as accessing a specific table, view, or index.
The following table lists the privileges supported by OceanBase Database in MySQL mode.
| Type | Privilege | Description |
|---|---|---|
| Object privileges | CREATE | The privilege to create databases and tables. |
| Object privileges | SELECT | The privilege to query data in tables. |
| Object privileges | INSERT | The privilege to insert row data into tables. |
| Object privileges | UPDATE | The privilege to modify existing data. |
| Object privileges | DELETE | The privilege to delete existing data. |
| Object privileges | DROP | The privilege to drop existing databases, tables, and views. |
| Object privileges | INDEX | The privilege to create and delete table indexes. |
| Object privileges | ALTER | The privilege to rename and modify schemas. |
| Object privileges | CREATE VIEW | The privilege to create views. |
| Object privileges | SHOW VIEW | The privilege to query views or learn how views operate. |
| Database-level privileges | SELECT | The privilege to query data in tables. |
| Database-level privileges | INSERT | The privilege to insert row data into tables. |
| Database-level privileges | UPDATE | The privilege to modify existing data. |
| Database-level privileges | DELETE | The privilege to delete existing data. |
| Database-level privileges | CREATE | The privilege to create databases and tables. |
| Database-level privileges | DROP | The privilege to drop existing databases, tables, and views. |
| Database-level privileges | INDEX | The privilege to create and delete table indexes. |
| Database-level privileges | ALTER | The privilege to rename and modify schemas. |
| Database-level privileges | CREATE VIEW | The privilege to create views. |
| Database-level privileges | SHOW VIEW | The privilege to query views or learn how views operate. |
| User-level privileges | CREATE | The privilege to create databases and tables. |
| User-level privileges | ALTER | The privilege to rename and modify schemas. |
| User-level privileges | SELECT | The privilege to query data in tables. |
| User-level privileges | INSERT | The privilege to insert row data into tables. |
| User-level privileges | UPDATE | The privilege to modify existing data. |
| User-level privileges | DELETE | The privilege to delete existing data. |
| User-level privileges | DROP | The privilege to drop existing databases, tables, and views. |
| User-level privileges | INDEX | The privilege to create and delete table indexes. |
| User-level privileges | CREATE VIEW | The privilege to create views. |
| User-level privileges | SHOW VIEW | The privilege to query views or learn how views operate. |
| User-level privileges | ALTER TENANT | The privilege to modify tenant information. |
| User-level privileges | ALTER SYSTEM | The privilege to execute the ALTER SYSTEM statement. |
| User-level privileges | CREATE RESOURCE POOL | The privilege to create, modify, and delete resource pools. |
| User-level privileges | CREATE RESOURCE UNIT | The privilege to create, modify, and delete resource units. |
| User-level privileges | CREATE USER | The privilege to execute the CREATE USER statement to create MySQL accounts. |
| User-level privileges | PROCESS | The privilege to execute the SHOW PROCESSLIST statement to view the processes of other users. |
| User-level privileges | SHOW DB | The privilege to view all database names on a server, including the names of the databases that are accessible to the user. |
| User-level privileges | FILE | The privilege to execute the SELECT INTO OUTFILE and LOAD DATA INFILE statements. |
| User-level privileges | SUPER | Indicates whether the user can perform some advanced management operations, for example, delete a user process by using the KILL statement, modify global MySQL variables by using the SET GLOBAL statement, and execute various commands related to copying and logs. |