Changing the Passwords of Default and ClickHouse Users
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 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.
Configuring the Passwords 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 password change result.
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.
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