Help Center/ MapReduce Service/ User Guide (Ankara Region)/ FAQs/ Big Data Service Development/ How Do I Modify the allow_drop_detached Parameter of ClickHouse?
Updated on 2024-11-29 GMT+08:00

How Do I Modify the allow_drop_detached Parameter of ClickHouse?

  1. Log in to the node where the ClickHouse client is located as user root.
  2. Run the following commands to go to the client installation directory and set the environment variables:

    cd /opt/Client installation directory

    source bigdata_env

  3. If Kerberos authentication is enabled for the cluster, run the following command to authenticate the user. If Kerberos authentication is disabled, skip this step.

    kinit MRS cluster user

    The user must have the ClickHouse administrator permissions.

  4. Run the clickhouse client --host 192.168.42.90 --secure -m command, in which 192.168.42.90 indicates the IP address of the ClickHouseServer instance node. The command output is as follows:

    [root@server-2110082001-0017 hadoopclient]# clickhouse client --host 192.168.42.90 --secure -m
    ClickHouse client version 21.3.4.25.
    Connecting to 192.168.42.90:21427.
    Connected to ClickHouse server version 21.3.4 revision 54447.

  5. Run the following command to set the value of the allow_drop_detached parameter, for example, 1:

    set allow_drop_detached=1;

  6. Run the following command to query the value of the allow_drop_detached parameter:

    SELECT * FROM system.settings WHERE name = 'allow_drop_detached';

  7. Run the q; command to exit the ClickHouse client.