跳到主要内容

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
备注

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

开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册