Privilege Categories¶
This page provides a quick reference to SQL privilege categories within a MatrixOne instance (tenant). To create users, bind roles, and perform console operations, see Permissions · MatrixOne. For AI Studio workspace roles and platform privilege points, see User Permissions. They use a different model.
Key concepts¶
Privileges are granted to roles, and roles are then granted to users. A user without a role cannot perform operations.
Objects have an Owner. The Owner can manage privileges on the object through discretionary access control.
The administrator created with an instance has the broadest management capabilities. Instances cannot access one another’s tenant resources.
Administrator (Account) level¶
Privilege |
Meaning |
|---|---|
|
User lifecycle |
|
Role lifecycle |
|
Database lifecycle |
|
Lists databases in the tenant |
|
Allows connection-side operations that do not depend on a specific object, such as |
|
Manages grants and role inheritance |
|
All tenant-level privileges. |
User level¶
Privilege |
Meaning |
|---|---|
|
Manages the user, including information, password, and deletion, and can grant this privilege onward |
Role level¶
Privilege |
Meaning |
|---|---|
|
Manages the role, including its name, description, and deletion, and can grant this privilege onward |
Database level¶
Privilege |
Meaning |
|---|---|
|
Lists tables in the database |
|
Table lifecycle |
|
Views |
|
Alters tables |
|
All privileges on the database. |
Table level¶
Privilege |
Meaning |
|---|---|
|
Reads, writes, and clears data |
|
Uses the table as a foreign-key target and views its structure with |
|
Creates or drops indexes |
|
All privileges on the table. |
Execution¶
Privilege |
Meaning |
|---|---|
|
Executes a function or stored procedure |
Publication and subscription¶
Data sharing across instances, including multiple instances under the same account. Historically, documentation limits most publication and subscription operations to administrative roles such as moadmin / accountadmin. Refer to the current instance’s role capabilities.
Publisher
Privilege |
Meaning |
|---|---|
|
Publication lifecycle |
|
Views publications |
Subscriber
Privileges related to creating and viewing subscriptions, such as creating a subscription database from a publication and using SHOW SUBSCRIPTIONS, are controlled by administrative roles and product policies. Read-only access to a subscription database still requires database and table privileges such as SELECT.
Detailed SQL privilege list¶
This article mainly introduces SQL permission management in MatrixOne, includingAdministrator permissions,User permissions,Role permissions,Database permissions,Table permissions,Publish subscription permissions
Administrator permissions¶
An administrator account will be created when each MatrixOne database instance is created. Objects with administrator permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
CREATE USER |
Create User |
DROP USER |
Delete User |
ALTER USER |
Modify User |
CREATE ROLE |
Create Role |
DROP ROLE |
Delete Role |
CREATE DATABASE |
Create a database |
DROP DATABASE |
Delete the database |
SHOW DATABASES |
View all databases under current tenant |
CONNECT |
Allows to use `use [database |
MANAGE GRANTS |
Permission Management. Including role authorization and role inheritance permissions |
ALL [PRIVILEGES] |
All permissions for Account |
OWNERSHIP |
Account All permissions can be set through |
User permissions¶
Administrators can create users, and objects with user permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
Ownership |
Manage all user permissions, including modifying user information, passwords, deleting users, and passing these permissions to other roles. |
Role Permissions¶
Objects with role permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
Ownership |
Manage all permissions of a role, including modifying the role name, describing, and deleting the role, and you can pass these permissions to other roles. |
Database permissions¶
Objects with database permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
SHOW TABLES |
View all tables in the current database |
CREATE TABLE |
Table creation permissions |
DROP TABLE |
Delete permission |
CREATE VIEW |
Create view permissions, create view cannot be queried without corresponding permissions |
DROP VIEW |
Delete View |
ALTER TABLE |
Modify table permissions |
ALTER VIEW |
Modify view permissions, the view cannot be modified without corresponding permissions |
ALL [PRIVILEGES] |
All permissions for the database |
OWNERSHIP |
All permissions of the database, attached |
Table permissions¶
Objects with table permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
SELECT |
Execute the |
INSERT |
Execute the |
UPDATE |
Execute the |
TRUNCATE |
Execute the |
DELETE |
Execute the |
REFERENCE |
Allows to reference tables as unique/primary key tables that are foreign key constraints. View the structure of the table with the |
INDEX |
Create Delete INDEX |
ALL |
Specify all permissions for tables |
OWNERSHIP |
Specify all permissions of the table, append |
Table execution permissions¶
Objects that have table execution permissions can have the following permissions:
Permissions |
Meaning |
|---|---|
EXECUTE |
Permissions to enable execution of functions or stored procedures |
Publish subscription permissions¶
In MatrixOne Intelligence, publish subscription is a data sharing access initiated by the database of the specified user in MatrixOne Intelligence. MatrixOne Intelligence allows data publishing and subscriptions between multiple instances under one account and instances across accounts.
Note: Currently, the moadmin and accountadmin roles are only supported in MatrixOne Intelligence to publish and subscribe operations.
-Release end
The publishing end is the party that publishes shared and synchronized data.
Permissions |
Meaning |
|---|---|
CREATE PUBLICATION |
Create Publish |
ALTER PUBLICATION |
Modify and release |
DROP PUBLICATION |
Delete Publish |
SHOW PUBLICATION |
View Publish |
SHOW CREATE PUBLICATION |
View Create Publish Statement |
-Subscribe end
The subscriber is the party that has obtained the shared and synchronized data.
Permissions |
Meaning |
|---|---|
CREATE DATABASE db_name FROM account_name PUBLICATION |
Create subscription |
SHOW SUBSCRIPTIONS |
View Subscribe |