Help wanted!
The following content of this documentation page has been machine-translated. But unlike other websites, it is not done on the fly. This translated text lives on GitHub repository alongside main ClickHouse codebase and waits for fellow native speakers to make it more human-readable. You can also use the original English version as a reference.
クエリの権限
問合せClickHouse大きく分けて複数の種類:
- データを読み込むためのクエリー:
SELECT
,SHOW
,DESCRIBE
,EXISTS
. - データクエリの記述:
INSERT
,OPTIMIZE
. - 設定の変更クエリ:
SET
,USE
. - DDL クエリ:
CREATE
,ALTER
,RENAME
,ATTACH
,DETACH
,DROP
TRUNCATE
. KILL QUERY
.
次の設定では、クエリの種類によってユーザー権限を調整します:
- 読み取り専用 — Restricts permissions for all types of queries except DDL queries.
- allow_ddl — Restricts permissions for DDL queries.
KILL QUERY
任意の設定で実行できます。
読み取り専用
制限のアクセス権読書データの書き込みデータや設定の変更ます。
クエリを型に分割する方法を参照してください 上記.
可能な値:
- 0 — All queries are allowed.
- 1 — Only read data queries are allowed.
- 2 — Read data and change settings queries are allowed.
設定後 readonly = 1
ユーザーは変更できません readonly
と allow_ddl
現在のセッションの設定。
を使用する場合 GET
の方法 HTTPインターフェ, readonly = 1
自動的に設定されます。 データを変更するには、 POST
方法。
設定 readonly = 1
ユーザーがすべての設定を変更するのを禁止します。 ユーザーを禁止する方法があります
からの変更は、特定の設定の詳細を見る 設定の制約.
デフォルト値:0
allow_ddl
許可または拒否 DDL クエリ。
クエリを型に分割する方法を参照してください 上記.
可能な値:
- 0 — DDL queries are not allowed.
- 1 — DDL queries are allowed.
実行できない SET allow_ddl = 1
もし allow_ddl = 0
現在のセッションの場合。
デフォルト値:1