Skip to main content

User & Role

This page provides a comprehensive overview of user and role operations in Databend, organized by functionality for easy reference.

User Management

CommandDescription
CREATE USERCreates a new user account
ALTER USERModifies an existing user account
DROP USERRemoves a user account
DESC USERShows detailed information about a user
SHOW USERSLists all users in the system

Role Management

CommandDescription
CREATE ROLECreates a new role
DROP ROLERemoves a role
SET ROLESets the current active role for the session
SET SECONDARY ROLESSets secondary roles for the session
SHOW ROLESLists all roles in the system

Privilege Management

CommandDescription
GRANTAssigns privileges to users or roles
REVOKERemoves privileges from users or roles
SHOW GRANTSShows privileges granted to users or roles
note

Proper user and role management is essential for database security. Always follow the principle of least privilege when granting permissions.

Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today