Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using ClickHouse/ ClickHouse O&M Management/ Changing the Password of the Default ClickHouse User (MRS 3.3.0-LTS and Later)
Updated on 2025-08-22 GMT+08:00

Changing the Password of the Default ClickHouse User (MRS 3.3.0-LTS and Later)

Scenarios

After a ClickHouse cluster is created, you can use the ClickHouse client to connect to the ClickHouse server.

Set the passwords of default ClickHouse users default and clickhouse after creating a ClickHouse cluster in normal mode.

  • default and clickhouse are default internal administrators of a ClickHouse cluster in normal mode (with Kerberos authentication disabled).
  • For a cluster in normal mode, if the default passwords of the default users default and clickhouse have been changed and the ClickHouseServer node is reinstalled, the passwords will be reset. You need to change the passwords again.

Notes and Constraints

This section applies only to MRS 3.3.0-LTS or later.

Changing the Passwords of Default and ClickHouse Users

  1. Log in to the ClickHouse installation node as user root and switch to user omm.

    su - omm

  2. Go to the $BIGDATA_HOME/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/clickhouse_change_password directory.

    cd $BIGDATA_HOME/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/clickhouse_change_password

  3. Run the following command to change the password of the default or clickhouse user:

    ./change_password.sh

    In the following figure, user clickhouse is used as an example. Enter clickhouse and its password as prompted, and wait until the password is changed.

    The password complexity requirements are as follows:

    • Contains 8 to 64 characters.
    • Contains at least one lowercase letter, one uppercase letter, one digit, and one of the following special character: -%;[]{}@_

  4. Check whether the password is changed.

    1. Log in to the node where the client is installed as the client installation user.
    2. Run the following command to switch to the client installation directory (for example, /opt/client):
      cd /opt/client
    3. Run the following command to configure environment variables.
      source bigdata_env
    4. Run the clickhouse client command to connect to the ClickHouse server. The password in the command is the new password.
      clickhouse client --host IP address of the ClickHouse instance --port 9000 --user Username --password