Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 修改数据库root密码后 tiup playground命令不能启动服务。
-
Start the service via command
tiup playground --host 192.168.60.179 --tiflash 0 --tag ylsoft
-
Log in to port 4000 using the root account
-
Change the default password for the root account
ALTER USER 'root'@'%' IDENTIFIED BY 'ylsoft';
-
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)
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.
I didn’t start TiFlash.
The service indeed stopped working after changing the database password.
Check the TiDB log
~/.tiup/data/ylsoft/tidb-0/tidb.log
Shutting down the service might not have actually closed it.
Run netstat -natp | grep 4000
to see if port 4000 is still in use.
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.
This is not the issue, 4000 is closed. I have uploaded the log file, but I can’t understand what this error means.
The log shows authentication failure due to incorrect root password.
The password has been changed, but the password definitely needs to be changed; it can’t always be the default password.
Oh, did you forget to refresh after changing the password?
flush privileges;
This is not the issue. Even after refreshing, it still won’t start.
TiDB has been changed and does not require a refresh.
Yes, I checked the official website’s instructions, and it didn’t mention needing to refresh.
WARN level logs generally don’t need attention. Looking at [ERROR] rpc error, it’s a network issue. Is your PD up?
“using password: NO
means no password was used, not that the password was incorrect.”
How can I get the service up and running?
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.
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)