Configuring the Default ClickHouse User Password (MRS 3.3.0-LTS or later)
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.
- This section applies to MRS 3.3.0-LTS or later.
- default and clickhouse are default internal administrators of a ClickHouse cluster in normal mode (with Kerberos authentication disabled).
- For a ClickHouse 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.
Changing the Password of the Default ClickHouse User
- Log in to the node where ClickHouse is installed as user root, switch to user omm, and go to the $BIGDATA_HOME/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/clickhouse_change_password directory.
su - omm
cd $BIGDATA_HOME/FusionInsight_ClickHouse_*/install/FusionInsight-ClickHouse-*/clickhouse/clickhouse_change_password
- Run the following command to change the password of user default or clickhouse:
./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 must meet the following complexity requirements:
- Contains 8 to 64 characters.
- Contains at least one lowercase letter, one uppercase letter, one number, and one special character (-%;[]{}@_).
- Check the changed password.
- For MRS 3.3.0-LTS version: Log in to the ClickHouse Server node and check the value of password_sha256_hex in the ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/users.xml file. The value is the new password.
cd ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/
vi users.xml
As shown in the following figure, the new password is stored in the password_sha256_hex file.
- For MRS 3.3.1-LTS and later versions: Log in to the ClickHouse Server node and check the value of password_PBKDF2_hex in the ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/users.xml file. The value is the new password.
cd ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/
vi users.xml
As shown in the following figure, the new password is stored in the password_PBKDF2_hex file.
- For MRS 3.3.0-LTS version: Log in to the ClickHouse Server node and check the value of password_sha256_hex in the ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/users.xml file. The value is the new password.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot