After changing the database root password, the tiup playground command cannot start the service

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

Original topic: 修改数据库root密码后 tiup playground命令不能启动服务。

| username: ouyhuang

  1. Start the service via command

    tiup playground --host 192.168.60.179 --tiflash 0 --tag ylsoft
    
  2. Log in to port 4000 using the root account

  3. Change the default password for the root account

    ALTER USER 'root'@'%' IDENTIFIED BY 'ylsoft';
    
  4. After stopping the service, restarting the service reports an error, and port 4000 cannot be started

    tiup playground --host 192.168.60.179 --tiflash 0 --tag ylsoft
    

How can I start it, why can’t it start? Or how can I change the root account password and still start the service normally?

Log file:
tidb.log (48.8 KB)

| username: Kongdom | Original post link

:astonished: This shouldn’t have any impact, right? You modified the database root password, not the operating system root password. Let’s see what specific error it reports when starting up.

| username: ouyhuang | Original post link

I didn’t start TiFlash.

The service indeed stopped working after changing the database password.

| username: ShawnYan | Original post link

Check the TiDB log
~/.tiup/data/ylsoft/tidb-0/tidb.log

| username: zhanggame1 | Original post link

Shutting down the service might not have actually closed it.
Run netstat -natp | grep 4000
to see if port 4000 is still in use.

| username: ouyhuang | Original post link

I uploaded it
[2023/08/03 09:59:50.666 +08:00] [ERROR] [pd_service_discovery.go:241] [“[pd] failed to update member”] [urls=“[http://192.168.60.179:2379]”] [error=“[PD:client:ErrClientGetMember]error:rpc error: code = Canceled desc = context canceled target:192.168.60.179:2379 status:READY: error:rpc error: code = Canceled desc = context canceled target:192.168.60.179:2379 status:READY”]

I don’t know what this error means.

| username: ouyhuang | Original post link

This is not the issue, 4000 is closed. I have uploaded the log file, but I can’t understand what this error means.

| username: cassblanca | Original post link

The log shows authentication failure due to incorrect root password.

| username: ouyhuang | Original post link

The password has been changed, but the password definitely needs to be changed; it can’t always be the default password.

| username: Kongdom | Original post link

Oh, did you forget to refresh after changing the password?
flush privileges;

| username: ouyhuang | Original post link

This is not the issue. Even after refreshing, it still won’t start.

| username: zhanggame1 | Original post link

TiDB has been changed and does not require a refresh.

| username: ouyhuang | Original post link

Yes, I checked the official website’s instructions, and it didn’t mention needing to refresh.

| username: zhanggame1 | Original post link

WARN level logs generally don’t need attention. Looking at [ERROR] rpc error, it’s a network issue. Is your PD up?

| username: ShawnYan | Original post link

using password: NO means no password was used, not that the password was incorrect.”

| username: ouyhuang | Original post link

How can I get the service up and running?

| username: ShawnYan | Original post link

Just starting the test? Remove and start over, stop the service, delete ~/.tiup/data/ylsoft, and that should do it. If the problem can still be reproduced, let’s discuss further.

| username: ouyhuang | Original post link

Reinstalled many times.

| username: ShawnYan | Original post link

It can indeed be reproduced…

$ tiup playground --host 192.168.195.128 --tiflash 0 --tag ylsoft
tiup is checking updates for component playground ...
Starting component `playground`: /home/shawnyan/.tiup/components/playground/v1.12.3/tiup-playground --host 192.168.195.128 --tiflash 0 --tag ylsoft
Using the version v7.2.0 for version constraint "".

If you'd like to use a TiDB version other than v7.2.0, cancel and retry with the following arguments:
        Specify version manually:   tiup playground <version>
        Specify version range:      tiup playground ^5
        The nightly version:        tiup playground nightly

Start pd instance:v7.2.0
Start tikv instance:v7.2.0
Start tidb instance:v7.2.0
Waiting for tidb instances ready
192.168.195.128:4000 ... Done

🎉 TiDB Playground Cluster is started, enjoy!
...

mysql> select version();
+--------------------+
| version()          |
+--------------------+
| 5.7.25-TiDB-v7.2.0 |
+--------------------+
1 row in set (0.00 sec)

mysql> alter user root@'%' identified by 'ylsoft';
Query OK, 0 rows affected (0.11 sec)

mysql> select user,host,authentication_string from mysql.user;
+------+------+-------------------------------------------+
| user | host | authentication_string                     |
+------+------+-------------------------------------------+
| root | %    | *343D863064865188992E8D2BEA644AC54835E7ED |
+------+------+-------------------------------------------+
1 row in set (0.00 sec)
| username: cassblanca | Original post link

My old eyes are blurry :sob: