About tiup cluster clean

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于tiup cluster clean

| username: zhanggame1

[Test Environment for TiDB]
[TiDB Version]
[Reproduction Steps] What operations were performed to encounter the issue
[Encountered Issue: Issue Phenomenon and Impact]
Today, during testing, I used tiup cluster clean tidb-test --all to clean the cluster, and then started the cluster again using tiup cluster start tidb-test. The cluster started normally, but the original root user of the cluster could not connect, showing incorrect username or password. Does this password have an initial default value?

| username: 我是咖啡哥 | Original post link

Is it no longer possible to log in with the previous initial password? The one that was automatically generated when the cluster was first created. Or try logging in without a password.

| username: 春风十里 | Original post link

If you add --init when starting, for example, tiup cluster start tidb-test --init, the root will have a default password. If you don’t add --init, the password will be empty.

| username: zhanggame1 | Original post link

After trying for a long time, I found that after cleaning, the root password was reset to empty, not the automatically generated one.

| username: zhanggame1 | Original post link

Indeed, I didn’t add --init, the root password is empty.

| username: redgame | Original post link

The document says there is an “initial-cluster” here…