Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 官方 tiup 基准测试无法运行,报错:panic: failed to connect to database when loading data

Bug Report
Following the official performance testing steps, no performance tests can be run on a server running the Ubuntu 20 operating system.
Reference documentation:
[TiDB Version]
6.5.0
[Impact of the Bug]
The official tiup benchmark test cannot run, error: panic: failed to connect to database when loading data
[Possible Steps to Reproduce the Issue]
# tiup bench tpcc -H 10.x.x.x -P 4000 -D tpcc --warehouses 1 --threads 1 prepare
tiup is checking updates for component bench ...
Starting component `bench`: /root/.tiup/components/bench/v1.12.0/tiup-bench tpcc -H 10.x.x.x -P 4000 -D tpcc --warehouses 1 --threads 1 prepare
panic: failed to connect to database when loading data
goroutine 1 [running]:
github.com/pingcap/go-tpc/tpcc.NewWorkloader(0x0?, 0xc0003dcfa0?)
/home/runner/work/go-tpc/go-tpc/tpcc/workload.go:110 +0x93d
main.executeTpcc({0xa9ce83, 0x7})
/home/runner/work/go-tpc/go-tpc/cmd/go-tpc/tpcc.go:64 +0x1ea
main.registerTpcc.func1(0xc000376dc0?, {0xa99807?, 0xa?, 0xa?})
/home/runner/work/go-tpc/go-tpc/cmd/go-tpc/tpcc.go:94 +0x25
github.com/spf13/cobra.(*Command).execute(0xc000376dc0, {0xc0000d20a0, 0xa, 0xa})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0xc000376580)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x39c
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main()
/home/runner/work/go-tpc/go-tpc/cmd/go-tpc/main.go:250 +0x7e5
[Observed Unexpected Behavior]
[Expected Behavior]
The test should run normally
[Related Components and Specific Versions]
# tiup bench
tiup is checking updates for component bench ...
Starting component `bench`: /root/.tiup/components/bench/v1.12.0/tiup-bench
Usage: tiup bench {ch/rawsql/tpcc/tpch/ycsb} [flags]
[Other Background Information or Screenshots]
Connection issues have been ruled out. The connection can be established using the MySQL client.
bogon:key xxx$ mysql -h 10.x.x.x -P 4000 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 483
Server version: 5.7.25-TiDB-v6.5.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>