Help Center/
CloudTable Service/
User Guide/
ClickHouse User Guide/
ClickHouse Cluster Management/
ClickHouse User Management/
Using User Management Commands
Updated on 2024-12-24 GMT+08:00
Using User Management Commands
This section describes how to use basic syntax and SQL statements to manage users.
- Creating a user
CREATE USER name IF NOT EXISTS ON CLUSTER default_cluster IDENTIFIED WITH sha256_password BY 'password';
- Specifying the IP address
CREATE USER name HOST IP '127.0.0.x' IDENTIFIED WITH sha256_password BY 'password';
- Changing a user password
ALTER USER name IF EXISTSON CLUSTER default_cluster IDENTIFIED WITH sha256_password BY 'password';
- Assigning a role to the user
GRANT role1, role2 TO new_user ON CLUSTER default_cluster;
- Canceling the role assignment.
REVOKE role1 FROM user ON CLUSTER default_cluster;
- Deleting a user
DROP USER IF EXISTS 'name1'ON CLUSTER default_cluster;
Parent topic: ClickHouse User Management
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot