Command overview

Updated at:

Data Control Language (DCL) provides commands for managing user roles and permissions.

The following table lists DCL commands with their required permissions and supported granularity levels.

Important
  • The ALL or ALL PRIVILEGES permission includes READ, WRITE, ADMIN, and TRASH. Granting ALL automatically grants all four. The following table lists only non-ALL permissions.

  • Lindorm user management operates at the instance level. Usernames and passwords apply to all engines within the same instance, but permissions can be configured separately.

Command classification

Command

Description

Required permissions

Supported granularity

User role management

CREATE USER

Creates a new user.

Requires both ADMIN and READ permissions.

GLOBAL

ALTER USER

Changes the password of a user.

Requires both ADMIN and READ permissions.

GLOBAL

SHOW USERS

Lists existing users. Run this command before creating a user to avoid duplicate username errors.

  • READ

  • WRITE

  • ADMIN

  • GLOBAL

  • DATABASE

  • TABLE

DROP USER

Deletes an existing user.

Requires both ADMIN and READ permissions.

GLOBAL

User permission management

SHOW PRIVILEGES

Views the permissions of all users. Only users with the ADMIN permission can run this command.

ADMIN

  • GLOBAL

  • DATABASE

  • TABLE

GRANT

Grants permissions to a user. Before granting permissions, review the supported permissions, scopes, and grantable objects in Lindorm.

ADMIN

GLOBAL

REVOKE

Revokes permissions from a user. Before you revoke permissions, run the SHOW PRIVILEGES command to check the permissions of the target user.

ADMIN

GLOBAL