Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tiup playground启动报error
[Test Environment for TiDB]
[TiDB Version] v6.3.0
[Reproduction Steps]
- Start the cluster
tiup playground -T zbq v6.3.0
- Log in to the client and change the root user password
mysql --comments --host 127.0.0.1 --port 4000 -u root -p
alter user ‘root’ identified by ‘xxx’;
flush privileges;
quit;
- Stop the cluster and restart
tiup playground -T zbq v6.3.0
TiDB reports an error on startup
[Encountered Issue: Phenomenon and Impact]
- Phenomenon: TiDB startup failed;
- Impact: How to determine if TiDB has started normally?
[Resource Configuration]
- Resource Configuration: Local startup
[Attachments: Screenshots/Logs/Monitoring]
- Screenshot:
Is the port occupied? Check the hidden directory under the home directory .tiup and look at the logs.
How was the cluster stopped?
Execute this to see if there are any clusters already started:
tiup playground display
The playground is just for debugging, it’s not enough. Install one with Docker, hehe.
After pressing ctrl c, is the 4000 port still there? Because when you started, 4000 was an error, which feels a bit strange.
After pressing Ctrl + C, port 4000 is no longer available.
Is there still an error when starting now?
It seems that the error has been identified. After changing the root user’s password and then attempting to log in without a password, an error occurs.
At this point, TiDB has actually already started.
The image link you provided appears to be broken or inaccessible. Please provide the text you need translated.
Alright, I’ve learned something new. If it doesn’t work: TiDB 用户账户管理 | PingCAP 文档中心
I always thought that tiup playground couldn’t persist data, but it turns out you can do it by adding -T. I specifically checked the documentation, and I’m not sure if I didn’t read it carefully before or if it was added later.
Note
- TiDB versions v5.2.0 and above support running
tiup playground
on machines with Apple M1 chips.
- The playground executed in this way will have its original cluster data cleaned up by TiUP after the deployment test ends. Re-executing the command will result in a brand new cluster.
- If you want to persist data, you can use TiUP’s
--tag
parameter: tiup --tag <your-tag> playground ...
. For details, refer to the TiUP Reference Manual.