Create user with default database

310 views
Skip to first unread message

Amit Sharma

unread,
Sep 27, 2021, 9:37:05 AM9/27/21
to ClickHouse
Hi, 
I am following the doc here and trying to create a user with access to a default database called 'lmd'. 


Here is the SQL I am running - 

CREATE USER name1

    IDENTIFIED WITH sha256_password  BY 'TEST'

   DEFAULT DATABASE 'lmd' ;


I get an error - Expected one of: ROLE, end of query

If I provide a role also just for the sake of it and run below query - 

CREATE USER name1

    IDENTIFIED WITH sha256_password  BY 'TEST'

   DEFAULT ROLE 'test' DEFAULT DATABASE 'lmd' ;

The error for this statement is - Expected one of: end of query, HOST, EXCEPT, Comma, SETTINGS, ON, GRANTEES, At, token


What am I missing?


Thanks, 

Amit




tatiana....@lifestreet.com

unread,
Oct 12, 2021, 10:12:57 AM10/12/21
to ClickHouse
Wrong version? It was implemented in 21.9
Reply all
Reply to author
Forward
0 new messages