问题
I have created multiple Databases in Clickhouse and a new User, and now can I restrict that newly created user to be able to access a particular database.
回答1:
In users.xml in 'user' (near profile, quota...) you could specify optional section
<allow_databases>
<database>default</database>
<database>test</database>
</allow_databases>
If there is no 'allow_databases' section - it means that access to all databases is allowed.
Access to database 'system' is always allowed (because system database is used to process queries). User could list all databases and tables (using SHOW queries or system tables), even if there is no access. Database access limits are completely unrelated to 'readonly' settings. There is no possibility to provide full access to one database and readonly access to another.
来源:https://stackoverflow.com/questions/43256501/restrict-user-access-rights-in-clickhouse